I ran this command:
"C:\xampp\php\.\php.exe" "C:\xampp\php\phpunit" -d xdebug.profiler_enable=on -d xdebug.idekey=VSCODE
C:\xampp\php\php.ini has the following:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.5.0-7.1-vc14.dll"
xdebug.idekey=VSCODE
xdebug.profiler_enable=1
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
If I run the command without Listen for XDebug, I will see the following in the command line window:
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 3.7.21 by Sebastian Bergmann.
Configuration read from C:\xampp\apps\summit\htdocs\wp-content\plugins\hl-market-tracker\phpunit.xml.dist
...
I went into VSCode and Listen for XDebug and when I run the command, I see Request 1 and 2 appears in the Call Stack but no unit test got run (it seems to be hung somewhere because Installing...
doesn't even show up in the command line window). If I stop listening for Xdebug, I will see read ECONNRESET
in the debug console, and then I will see the Running as single site...
statement being printed out (but not the Installing...
statement)
Questions:
I would like to understand how to get debugging to work when I try to run the unit test?
Why did I see the hung behavior described above? What am I not understanding?
References: