cargomedia/vagrant-phpstorm-tunnel

Moved VM providers from Virtualbox to VMWare Fusion - lost remote XDebug in PHPStorm

Closed this issue · 6 comments

FYI, I recently changed VM providers from virtualbox to VMWare Fusion, and in the process, I lost my remote debugging capabilities for XDebug.

I followed all of the previous steps that worked for virtualbox, but I'm not certain why it isn't working. Complicating factors is that I also recently upgraded to PHPStorm 8, which worked fine with my existing virtualbox vagrant install, but stopped working upon the change from virtualbox to VMWare Fusion. I attempted exporting the VM variable to the new virtual machine as suggested in the docs, but it didn't appear to help.

Any suggestions? Are there networking specifics that I should be aware of?

Further info - PHPUnit via tunnel still works.

njam commented

To clarify, with "remote debugging" do you mean the "telephone/listening" approach (screen shot 2014-09-26 at 09 37 44) or debugging phpunit tests (screen shot 2014-09-26 at 09 37 48)?
Also what error behaviour do see exactly?

Both work for me with PhpStorm 8.0 and Virtualbox.
In case you're debugging phpunit tests make sure to have a look at this piece of docu.

Adding @alexispeter

I am debugging the web application, not the unit tests.
I had always used the bug icon to initiate tests with XDebug. It opened a new window with my devbox url followed by something like "?XDEBUG_SESSION_START=11833" - the five digit number was randomly assigned by PHPStorm when clicking the debug button. PHPStorm would open a debug window and indicate "Waiting for incoming connections with ide key '11833'" until the code from that window hit a break point, at which time the application would suspend and the PHPStorm debugger would allow me to inspect variables, step through code, etc.

I can provide further information on my run/debug configurations, if needed.

My guess is that my xdebug.remote_host value might be wrong. Since I'm only accessing it locally on my devbox, I'm going to try enabling xdebug.remote_connect_back instead and see if that helps anything.

Yep, it was my fault. I didn't keep track of the xdebug.remote_host IP differences between VM providers. Opening it up to all remote connections made it work just fine. Later, I might figure out the specific remote host that I need to enable, for now, since it's custom config on my devbox, I'm good with my solution. Apologies for taking up your time.

njam commented

Makes sense!
For reference we're using these xdebug settings:

xdebug.profiler_enable_trigger = 1
xdebug.remote_enable = 1
xdebug.remote_host = 'localhost'
xdebug.remote_port = 9000
xdebug.remote_connect_back = true
xdebug.remote_autostart = false