Reputation: 1724
PHP, XDebug, and my IDE (PhpStorm) are all configured properly. PhpStorm is listening, and it's picking up the debug session, but it never hits the breakpoint in my unit test class and I'm unable to step through it. The entire test runs.
Anyone have any ideas?
Upvotes: 4
Views: 2009
Reputation: 4146
I can step into PHPUnit tests without a problem using XDebug. However, I did notice that it sometimes seems to skip certain statements (such as simple assignment to variables in a function without anything else), so spread some breakpoints around.
Make sure you've set up path mapping properly, with the correct version of the library mapped over.
If you're using XDebug from the command-line, you have to set certain environment variables - see here and here.
In my case, the following environment variables needed to be set in the remote box and run from the remote box. 10.0.2.2
works OK for Virtualbox VMs - basically you need to point to your local machine.
export XDEBUG_CONFIG="idekey=PHPSTORM remote_host=10.0.2.2 remote_port=9000"
export PHP_IDE_CONFIG="serverName=[yourservernamehere]"
Upvotes: 4