brookhong / DBGPavim

This is a plugin to enable php debug in VIM with Xdebug, with a new debug engine.
132 stars 19 forks source link

debugging phpunit session #5

Closed donnut closed 12 years ago

donnut commented 12 years ago

I tried to debug an unit test file.

phpunit -d xdebug.remote_autostart=1 -d xdebug.remote_port=9009 unit/AnnotationTest.php

The test is executed without stopping at the breakpoint.

Is debugging a unit file possible?

brookhong commented 12 years ago
  1. there is no space between -d and xdebug.xxxx, ie, it should be -dxdebug.xxxxx=xxx
  2. -dxdebug.xxxxx=xxx is option accepted by the executable php itself, phpunit is a php script, i'm not sure if it accepts -d option.

A possible solution can be php -dxdebug.remote_autostart=1 -dxdebug.remote_port=9009 /phpunit unit/AnnotationTest.php

donnut commented 12 years ago

I used the space between -d and the option because it seems what both php and phpunit require (http://php.net/manual/en/features.commandline.options.php). Doesn't make any difference to the problem anyway. I've tryed your solution, but it doesn work. I'll try to put the options in a local php.ini file.

mbedna commented 10 years ago

I tried to debug phpunit test and I found issue described here. Is this issue solved? Is is possible to debug phpunit test using DBGPavim?