I followed Rafael Dohms's article to use NetBeans debugging tools for phpunit tests.
The problem is when I start debugging in NetBeans and run test using command line, NetBeans switches from "waiting for connection" state to "netbeans-xdebug runnig". But program stops at command line after "cofiguration read from ..." and also none of debug actions(Step over, Step into etc) are active.
I tried to disable "Stop at first line" option and also using debug file for debuging, but none of them worked.
Did I miss something in configuration or using NetBeans tools?
update
I tried to fix the problem using NetBeans but it didn't work. finally I used PhpStrom to debug the code, although I got same result, I succeed to debug normal CLI program and also tracking my phpunit test program. I realized that debugging freezes in "pear\PHPUnit\Util\PHP.php" file, in the following line:
$stdout = stream_get_contents($pipes[1]);
I'm using Windows 7 and php-v5.3
Found this post when searching for the line
$stdout = stream_get_contents($pipes[1]);
in combination with keywords xdebug and phpunit.
I got stuck with equal symptoms, phpstorm (never tried netbeans) eventually led me to this line stalling.
During stepping to this line I noticed some mentions of 'process isolation', which made me drop the --process-isolation parameter in my xdebug call (this in itself we use to workaround a memory leak). Now the bugging line does not get called, and normal xdebug/unittest operation continiue's
Not claiming this to be a solution, but at least was a workable workaround for me. Also might give some direction to actually problem/solution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With