Skip to content

Instantly share code, notes, and snippets.

@MatthieuScarset
Created December 13, 2020 20:23
Show Gist options
  • Save MatthieuScarset/6e02e87f930a0917b9c6f4b2826660f1 to your computer and use it in GitHub Desktop.
Save MatthieuScarset/6e02e87f930a0917b9c6f4b2826660f1 to your computer and use it in GitHub Desktop.
Lando (+3.0) with XDebug (WordPress recipe)
name: wordpress
recipe: wordpress
services:
appserver:
webroot: .
xdebug: debug
config:
php: .vscode/php.ini
tooling:
install:wordpress:
service: appserver
cmd:
- wp core download && wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug (9003)",
"type": "php",
"request": "launch",
"port": 9003,
"log": false,
"pathMappings": {
"/app/": "${workspaceFolder}/",
}
}
]
}
[PHP]
; 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
xdebug.remote_host = ${LANDO_HOST_IP}
xdebug.remote_connect_back = 1
xdebug.remote_log = /tmp/xdebug.log
; Test
; @see https://stackoverflow.com/questions/63816309/unable-to-get-xdebug-working-with-lando-and-vscode-connects-and-stops-immediate
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_host = ${LANDO_HOST_IP}
xdebug.log = /tmp/xdebug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment