Michael
Michael

Reputation: 4876

No incomming connection from XDebug on Ubuntu VirtualMachine to PhpStorm on Windows host

I have a Win7 on my laptop and a VMware Machine running Ubuntu.

On the last one I have my LAMP configured and also a samba server in order to be able to share my projects to Win7 (mapping a drive).

I just installed xdebug through a package manager and done the following configuration in the php.ini:

extension=xdebug.so
[xdebug]
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_host=192.168.199.2 # this is my $_SERVER['REMOTE_ADDR']
xdebug.remote_port=9055
xdebug.show_local_vars=0
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20
xdebug.show_exception_trace=0

Then I got through the following checklist:

But nothing works for me.

Upvotes: 1

Views: 1590

Answers (1)

Michael
Michael

Reputation: 4876

Briefly, the fix for my problem was this:

  • enable xdebug.remote_log (where I could check for connection attempts and identify the exact IP to which xdebug was trying to connect) - [this was the key]
  • removed/set to 0 xdebug.remote_connect_back (because it overwrites remote_host with $_SERVER['REMOTE_ADDR'])
  • set the proper xdebug.remote_host
  • removed extension=xdebug.so an loaded xdebug using only zend_extension

So, every time, do not forget to check the logs if exists! :)

Thanks to LazyOne for very helpful hints!

Upvotes: 1

Related Questions