DEV Community

Discussion on: Xdebug in VSCode with Docker

Collapse
 
apmyp1990 profile image
apmyp1990

I tried to tell my xdebug (in docker) the ip of my Windows Host hardcoded and via host copied from wsl to docker (that worked for another case), but the breakpoints were never hit.
Unfortunately I do not have any logs.

Here's my setup:


xdebug.ini

zend_extension=xdebug.so

xdebug.mode=debug,develop
xdebug.client_host=172.28.32.1
#same port as in launch.json
xdebug.client_port=9003
xdebug.idekey=VSCODE
xdebug.start_with_request=yes

launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug on Docker",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "pathMappings": {
                "/amadeus360": "${workspaceFolder}"
            },
        },
    ]
}
Enter fullscreen mode Exit fullscreen mode