wordpress icon indicating copy to clipboard operation
wordpress copied to clipboard

Xdebug v3 remote step debugger config missing

Open jaakkolehtonen opened this issue 3 years ago • 2 comments

Hi, seravo/wordpress:development docker image ships with xdebug v3 but configuration (/etc/php/7.4/fpm/conf.d/20-xdebug.ini) is still for v2.

This fixes remote step debugging in v3:

docker-compose exec --user vagrant wordpress bash

sudo nano /etc/php/7.4/fpm/conf.d/20-xdebug.ini

# Append these to end of file
xdebug.mode=develop,debug
xdebug.client_host=host.docker.internal
xdebug.start_with_request=yes
xdebug.log=/data/log/xdebug.log

wp-restart-php

jaakkolehtonen avatar Dec 14 '22 22:12 jaakkolehtonen

Im using VSCode for step debugging with following config and everything works great:

.vscode/launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "pathMappings": {
                "/data/wordpress/htdocs/": "${workspaceRoot}/htdocs/"
            }
        }
    ]
}

.vscode/settings.json

{
  "php.debug.ideKey": "vagrant"
}

jaakkolehtonen avatar Dec 14 '22 22:12 jaakkolehtonen

Hi, this should be fixed in seravo/wordpress:nightly. We're still testing and ironing out some stuff before we're comfortable releasing a new version for the development tag. But if you could give the nightly version a spin and test that everything works nicely on your end too, that would be appreciated.

frimro avatar Dec 15 '22 09:12 frimro