PHPStorm - Remote Debugger not working


I am new PHPStorm; just downloaded trial version today to test it. I am trying debugger with remote host but its not working. Following are my settings.

Network location: M:\sites\www (M: = \\\Server)
Network Server: WAMP (Apache 2.2, PHP 5.3.13)

Local Location: C:\server\sites\www

I created a new project "Web server on remote host, files are accessible via network share, mounted drive)
Now I have copy of project in Local Location

I then  create a "PHP Web Application" configuration:
Port 80

Xdebug is installed on server with following config (And I verified it with phpinfo())

xdebug.remote_host =
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req

I then start debug session and it opens

Project is set to Listenind in IDE

I then create a breakpoint in index.php (which is open from my local machine)

But then as I browse next page, nothing happens. There is no break point.

Can you please help? I am not sure what I am doing wrong. I have following many articles but nothing
Comment actions Permalink

Hi there,

xdebug.remote_host =

This should be IP of computer where PhpStorm is running (as seen from server -- for example from $_SERVER["REMOTE_HOST"]).

Comment actions Permalink

I just tried i but, unfortunately, it still din't work. I used same IP of my machine (same as REMOTE_ADDR). I even checked it in phpinfo() to be sure.

Still, there is no breakpoint.

Oh and does this mean I can only use one machine to debug?

Comment actions Permalink

I think I understand it now and just found the issue (maybe). So, xdebug logs it on the server and then sends that data back to the server where PHP IDE is running.

I just tested it and it seems there is firewall blocking most of the ports FROM the server (I was checking for ports TO server before).

Comment actions Permalink

Yes -- xdebug initiates connection to client (PhpStorm in our case) and not other way around.

If you are behind router (e.g. your server is on Internet) then you will have to do port-forwarding on the router so that all incoming packets to xdebug port will be forwarded to your PC.

Comment actions Permalink

Thanks So, yes its firewall and router issue then. I have asked my IT team to open that port.

Debugger works locally and that's where I do most of my work so its good. Just wanted to make it work on remote to debug live (test) apps if needed.

Thanks for the help!!! Its now clear how it works and the issue.


Please sign in to leave a comment.