docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

xdebug not function in vs code

Open Dankdev021 opened this issue 1 year ago • 2 comments

Currently even following the README steps, the use of xdebug for the vs code tool is not working!

Dankdev021 avatar Mar 20 '23 20:03 Dankdev021

Without more information is not possible to determine exactly what your issue is but for me, I discovered that it was because the Xdebug client was trying to listen on IPv6 and the container host was trying to reach out on IPv4.

In .vscode/launch.json I use the following configuration:

{
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "hostname": "127.0.0.1",
      "request": "launch",
      "stopOnEntry": true,
      "log": true,
      "pathMappings": {
        "/var/www/html": "${workspaceFolder}"
      },
      "port": 9003,
    }
  ]
}

Adding the hostname attribute with IPv4 localhost forces the client to listen on IPv4 - wasn't able to get it to comply any other way.

GamesmenJordan avatar Mar 29 '23 00:03 GamesmenJordan

what OS are you using?

MaskeZen avatar Apr 10 '23 18:04 MaskeZen