Remote debugging

Hi guys!

I'm trying to setup remote debugging with xDebug for PHPStorm.

My remote server xdebug configuration and debug settings are attached.

I've been set browser bookmarklets and started Listen PHP Debug Connections. When I press Start Debugger + Reload Page or just Debug This Page - the page is reloads and nothing happens.

I also tried to debug with PHP Web Application but it just opens browser on needed page.

I'm not using firewalls or proxies. Remote server IP is set in my /etc/hosts file.

Did I missed something?

1 comment
Comment actions Permalink

Hi Dima,

I'm not 100% sure on this (since you have not provided all details yet) but I think you may misconfigured xdebug a bit.

What is -- is it your PC or server? Based on "Remote server IP is set in my /etc/hosts file" I assume it is server IP.

xdebug is the one who will initiate connection to debugger client (in our case it will be PhpStorm). Therefore:

  1. xdebug.remote_host -- this must be your IP address (where PhpStorm is running) and not your server IP
  2. because it will be incoming connection to your PC, you must ensure that no firewall will be blocking it (in cas you have one -- yes, you said you do not have one, but just in case). If you are behind router (which is very likely considering the IP and especially when server is somewhere on Internet), you need to setup port forwarding (so incoming connection on xdebug port will be routed to your PC)

I assume you have seen these articles/guides already. If not -- have a look, maybe they will help:


Please sign in to leave a comment.