Help configuration PHP Debug Visual Studio Code

Asked

Viewed 588 times

3

using Docker, I would like to debug my PHP code, through the "PHP Debug" plugin of Visual Studio Code, however, I am encountering problems when debugging, with Netbeans works.

Follow my settings:

PHP version: 7.0 Xdebug version: 2.5.0 Adapter version: Visual Studio Code 1.13.0

Your launch.json:

{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"stopOnEntry": true,
"localSourceRoot": "/home/alisson/projetos/g-mus-dev",
"serverSourceRoot": "/home/developer/workdir"
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}

XDebug php.ini config:

zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=172.17.0.1
xdebug.remote_port=9000

Does anyone have any doubt what it might be?

  • What’s the problem? the error plugin and close the text editor? debug does not stop us break points?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.