PHPStorm - Remote Debugger not working

Hi,

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: = \\10.20.31.23\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:
Server: http://test.server.com
Port 80
xdebug

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

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



I then start debug session and it opens http://test.server.com/?XDEBUG_SESSION_START=10679

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
http://confluence.jetbrains.com/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0
http://www.jetbrains.com/phpstorm/demos/remote_debugging/remote_debugging.html
5 comments

Hi there,

xdebug.remote_host = 127.0.0.1

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

0

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?

0

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

0

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.

0

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.

0

Please sign in to leave a comment.