PHP version: 7.1.0
XDebug version: 2.5.0
Adapter version: 1.10.0
Your launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 8999,
"log": true
}
]
}
XDebug php.ini config:
[xdebug]
zend_extension=/Users/john/.phpbrew/php/7.1/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.idekey = john-xdebug
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 8999q
xdebug.remote_log = "/sites/x/php/xdebug.log"
XDebug logfile (from setting xdebug.remote_log in php.ini):
https://gist.github.com/johnbillion/5ade700e7a0db209d63ee95e6d60827a
Adapter logfile (from setting "log": true in launch.json):
https://gist.github.com/johnbillion/2476befecc0b5734ae830ec8fb4584c7
Code snippet to reproduce:
N/A
The PHP Debug Adapter for Visual Studio Code works well for me over HTTP (eg. via a web page in the browser) and via the CLI with php -f <file>. However, when running phpunit on the CLI, the adaptor exhibits strange behaviour and doesn't function as expected.
As soon as the command starts, two entries appear in the Call Stack panel:

These entries aren't expandable/collapsable like a normal stack trace, and the adaptor is otherwise non-functional (the only thing that works is the Stop button). The Pause button remains in place of the Continue button, breakpoints don't trigger, and the command hangs indefinitely until you exit with ctrl+c on the CLI or abort the execution with the Stop button in VS Code.
Whilst trying to narrow down the problem, I ran the Xdebug client for Atom while running phpunit and it worked as expected. I was able to step through code etc as normal with no problems.
Any ideas where the problem might lie? Any other debugging info I can provide?
PHP version: 7.1.0
XDebug version: 2.5.0
Adapter version: 1.10.0
Your launch.json:
XDebug php.ini config:
XDebug logfile (from setting
xdebug.remote_login php.ini):https://gist.github.com/johnbillion/5ade700e7a0db209d63ee95e6d60827a
Adapter logfile (from setting
"log": truein launch.json):https://gist.github.com/johnbillion/2476befecc0b5734ae830ec8fb4584c7
Code snippet to reproduce:
N/A
The PHP Debug Adapter for Visual Studio Code works well for me over HTTP (eg. via a web page in the browser) and via the CLI with
php -f <file>. However, when runningphpuniton the CLI, the adaptor exhibits strange behaviour and doesn't function as expected.As soon as the command starts, two entries appear in the Call Stack panel:
These entries aren't expandable/collapsable like a normal stack trace, and the adaptor is otherwise non-functional (the only thing that works is the Stop button). The Pause button remains in place of the Continue button, breakpoints don't trigger, and the command hangs indefinitely until you exit with
ctrl+con the CLI or abort the execution with the Stop button in VS Code.Whilst trying to narrow down the problem, I ran the Xdebug client for Atom while running
phpunitand it worked as expected. I was able to step through code etc as normal with no problems.Any ideas where the problem might lie? Any other debugging info I can provide?