I've determined the root cause of #154 and produced a tiny reproducible example. It's not related to PHPUnit, it's caused by a call to system() which spawns a second PHP process and causes the VS Code debugger to malfunction.
Running the test case below will cause the debugger to get "stuck", with two requests appearing in the call stack panel and nothing else functional apart from the Stop button.

// 1.php
<?php
echo 'Running 1.php' . PHP_EOL;
system( 'php 2.php' );
echo 'Completed 1.php' . PHP_EOL;
// 2.php
<?php
echo 'Running 2.php' . PHP_EOL;
Steps to reproduce:
- Place a breakpoint on the last line of
1.php and launch the VS Code debugger.
- Run
php 1.php on the command line
- Observe that the debugger locks up with two requests showing in the call stack panel and nothing else functional.
PHP version: 7.1.0
XDebug version: 2.5.5
Adapter version: 1.12.1
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"
I've determined the root cause of #154 and produced a tiny reproducible example. It's not related to PHPUnit, it's caused by a call to
system()which spawns a second PHP process and causes the VS Code debugger to malfunction.Running the test case below will cause the debugger to get "stuck", with two requests appearing in the call stack panel and nothing else functional apart from the Stop button.
Steps to reproduce:
1.phpand launch the VS Code debugger.php 1.phpon the command linePHP version: 7.1.0
XDebug version: 2.5.5
Adapter version: 1.12.1
Your launch.json:
XDebug php.ini config: