Skip to content

Instantly share code, notes, and snippets.

@MatthieuScarset MatthieuScarset/.lando.yml
Last active Mar 28, 2020

What would you like to do?
Correct settings for Xdebug + VSCode + lando
name: agr-003
recipe: drupal8
webroot: docroot
xdebug: true
php: .vscode/php.ini
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit:
"version": "0.2.0",
"configurations": [
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true,
// "localSourceRoot": "${workspaceRoot}/", // Deprecated
// "serverSourceRoot": "/app/", // Deprecated
"pathMappings": {
"/app/": "${workspaceRoot}/",
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
;PLACE THIS FILE UNDER .vscode folder;
; Xdebug
xdebug.max_nesting_level = 256
xdebug.show_exception_trace = 0
xdebug.collect_params = 0
; Extra custom Xdebug setting for debug to work in VSCode.
xdebug.remote_enable = 1
xdebug.remote_autostart = 1

This comment has been minimized.

Copy link

smk commented Feb 13, 2018

It's not necessary to duplicate Lando's default php.ini, since the custom php.ini is loaded additionally to any existing PHP configuration.


This comment has been minimized.

Copy link
Owner Author

MatthieuScarset commented Mar 3, 2018

Totally right, thank you for your comment @smk. I've update php.ini with XDebug settings only.


This comment has been minimized.

Copy link

redrambles commented Nov 6, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.