PHPStorm does not break at breakpoints in phpunit using vagrant

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:// -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host= /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: :-|
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns: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[]]></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="" 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="" 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="" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>

<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" command="status" transaction_id="4" status="starting" reason="ok"></response>

<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns: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="" 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="" 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?

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 .. ;)


Comment actions Permalink

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)

Comment actions Permalink

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.

Does not break.png
Breaking correctly.png
Comment actions Permalink

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.

  • How did you configure your Remote PHP Interpreter? I mean -- what source have you used: vagrant details, custom SSH or existing SFTP Deployment entry?
  • Same for deployment -- do you use SFTP or some another way?

Suggestion to try:

  • If you do not use SFTP as a deployment (to upload files to Vagrant) then please set up new entry, configure it and mark it as Default for this project
  • If Remote PHP Interpreter was created using vagrant details or custom SSH details, then please create new one using that SFTP entry; choose it as PHP Interpreter for this project.
  • Try with such details
Comment actions Permalink

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 :)


Please sign in to leave a comment.