PHPStorm does not break at breakpoints in phpunit using vagrant
Hi,
I'm using a vagrant installation and want to debug my unit tests. I installed Xdebug an it is running perfect with the browser.
The unit tests are also running on the vm.
Running the unit tests states:
ssh://vagrant@gw2.abs-net.de:22/usr/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=192.168.34.1 /home/vagrant/.phpstorm_helpers/phpunit.php --configuration /var/www/phpunit.xml
Testing started at 14:42 ...
.....
Process finished with exit code 0
The xdebug log states:
Log opened at 2015-03-05 13:42:41
I: Checking remote connect back address.
W: Remote address not found, connecting to configured address/port: 192.168.34.1:9000. :-|
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/vagrant/.phpstorm_helpers/phpunit.php" language="PHP" protocol_version="1.0" appid="20107" idekey="15620"><engine version="2.2.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="break" reason="ok"><xdebug:message filename="file:///home/vagrant/.phpstorm_helpers/phpunit.php" lineno="4"></xdebug:message></response>
<- stack_get -i 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="6"><stack where="{main}" level="0" type="file" filename="file:///home/vagrant/.phpstorm_helpers/phpunit.php" lineno="4"></stack></response>
<- run -i 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="7" status="stopping" reason="ok"></response>
<- run -i 8
Log closed at 2015-03-05 13:42:41
Everything seems to be fine. But PHPStorm nevert stops at its breakpoints and I can not figure out why?
Environment:
Mac Yosemite
XDebug 2.2.3 (I also tried new newest one, without effect)
PHPUnit 4.5.0
PHPStorm 8.0.3
May be someone has any ideas about this .. ;)
Volker
Please sign in to leave a comment.
Hi there,
I see no breakpoints at all.
1) Please show screenshot of your file with breakpoints in it (whole IDE window)
2) Please show screenshot of your debugger tool window when debuggin (whole window)
I attached two screenshots.
The first one shows PHPStorm breaking correctly when I use the browser.
The second one shows the PHPUnit tests running without breaking at the breakpoint.
Attachment(s):
Does not break.png
Breaking correctly.png
Accordingly to your log, for whatever reason IDE has never sent a "register breakpoint" command.
As you can see from your screenshots -- the not working case has different breakpoint icon than when it works.
Suggestion to try:
Hy Andriy,
switching the PHP Interpreter to Vagrant did the magic.
I is slower than SFTP Config because of the upcomming "Running Vagrant ssh-config" dialog, but the breakpoints now work !
Manny thanx for you quick help :)
Volker