PhpStorm not receiving incoming debugger connections


I'm having some trouble debugging with Xdebug and pydbgpproxy. I'm able to register my IDE key with the proxy but I do not get an 'Incoming debugger connection' dialog when opening the webpage. Actually, to make this a bit confusing, I did get the dialog but just a couple times and then never again. Also, I can debug just fine using Eclipse and the same proxy.

I can reproduce it as follows:
1. Start DBGp proxy script on remote server that is running PHP with Xdebug.
2. Start PhpStorm.
3. Configure Xdebug Proxy settings and register IDE. (Notification says 'IDE successfully registered with ide key 'myidekey'.)
4. In the output of the proxy script, on the remote server I see "INFO: dbgp.proxy: Server:onConnect ('', 54979) [proxyinit -p 9000 -k myidekey -m 0]"
5. Load a PHP page that the server has in Firefox.
6. [This is where I expect the 'Incoming debugger connection' dialog] Nothing happens in PhpStorm. Page just loads. Did not get a chance to debug. (Here is where Eclipse brings up a dialog asking me if I want to accept a debugger connection.)

In the output of the proxy script I see one of two things:
1. An error message, saying the connection was refused:

ERROR: dbgp.proxy: Unable to connect to the server listener [<__main__.sessionProxy instance at 0xa295f0>]
Traceback (most recent call last):
  File "Komodo-PythonRemoteDebugging-6.1.1-61234-linux-x86_64/bin/pydbgpproxy", line 234, in startServer
    self._server.connect((self._serverAddr[0], self._serverAddr[1]))
  File "/usr/local/lib/python2.7/", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
WARNING: dbgp.proxy: Unable to connect to server with key [myidekey], stopping request [<__main__.sessionProxy instance at 0xa295f0>]

2. Numerous repeats of the following message:

DEBUG: dbgp.proxy: session dispatching call '<?xml version="1.0" encoding="iso-8859-1"?>\n<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" fileuri="file:///usr/local/lib/php/Initialize.php" language="PHP" protocol_version="1.0" appid="4258" idekey="cody"><engine version="2.1.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[]]></url><copyright><![CDATA[Copyright (c) 2002-2011 by Derick Rethans]]></copyright></init>'

As for the few times that I actually got the 'Incoming debugger connection' dialog, nothing happened when I clicked the debug button. Script execution did not stop like it did in Eclipse and the page loaded as it would without a debugger. I'm confused about why I got the dialog the first couple times but do not get it anymore. As far as I can tell, everything is set up correctly as I can follow an identical process and get it to debug in Eclipse.

Comment actions Permalink

Most of the team is on vacation now, but we get to your question next monday.

Comment actions Permalink

Hello smm,

Sorry for delay.

Did you enable 'Listen PHP debug connections' mode after registration of the PhpStorm in the dbgp proxy?

Thank you for feedback!

Comment actions Permalink

Hello smm,

Do you still have the issue?

Thank you for feedback!

Comment actions Permalink

It seems to be working well now, I'm not entirely sure what the problem was. The problem was intermittent before so maybe I missed something then.

Thanks for the assistance!


Please sign in to leave a comment.