Cannot connect to xdebug proxy Follow
Hi,
I'm trying to setup PHP debugging with Xdebug but I'm having trouble getting PhpStorm to connect to the xdebug proxy. When I go to Tools | Xdebug Proxy | Register IDE I get the following error notification:
Cannot connect to xdebug proxy on 'xx.xx.xxx.xxx:9001'
Does anyone know why it would be unable to connect? Considering the info below, the problem definitely seems to be PhpStorm not registering with the proxy.
More info:
I'm using the pydbgpproxy on the remote server. Output from pydbgpproxy when I start it:
$ python pydbgpproxy
INFO: dbgp.proxy: starting proxy listeners. appid: 6937
INFO: dbgp.proxy: dbgp listener on 127.0.0.1:9000
INFO: dbgp.proxy: IDE listener on 127.0.0.1:9001
When I load a PHP page in a browser, I get this output from pydbgpproxy (I believe that this is because PhpStorm could not register itself with the proxy):
INFO: dbgp.proxy: connection from 127.0.0.1:44893 [<__main__.sessionProxy instance at 0x14ea488>]
WARNING: dbgp.proxy: No server with key [smm11], stopping request [<__main__.sessionProxy instance at 0x14ea488>]
INFO: dbgp.proxy: session stopped
I noticed that there might be a problem with keys being mismatched so I tried all sorts of possible ones and all give the same result. (?XDEBUG_SESSION_START=xxx)
php.ini:
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_handler=dbgp
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_autostart=0
; This gets overridden to 'root' (I can see this in phpinfo()), I've tried using both in the URL params.
xdebug.idekey=smm11
xdebug.remote_log="/home/xdebug/xdebug.log"
xdebug.overload_var_dump=1
xdebug.trace_format=0
xdebug.show_exception_trace=0
xdebug.default_enable=0
Some additional info:
-without the dbgp proxy, I can debug in Vim with the dbgp plugin
-multiple developers working on one project
-can't use xdebug.remote_connect_back because of security and because we're using Varnish
-developers work locally in PhpStorm and use automatic FTP to sync files on remote server
-apache httpd serves each dev's workspace on the remote server
Please sign in to leave a comment.
Hello smm,
Sorry for delay.
One of our users developed a simple php script which helps to register an IDE in xdebug proxy - http://youtrack.jetbrains.net/issue/WI-1818#comment=27-207037.
Please try to register PhpStorm using the script. It will help us to understand whether the problem related to PhpStorm or not.
Thank you for feedback!
Thanks for the response! I get the following warning when I run the script:
smm,
Please check your server hostname. Do you have any software running on server which can refuse incomming connections?
Thank you for feedback!
I've tried registering multiple times, with the server's IP address and with the hostname.
I'm not sure what software would refuse incoming connections. (Also, if I didn't mention earlier, the server is running Linux.) I am able to ssh to the server from my local computer. I tested the IDE listener port by starting an ssh daemon listening on port 9001 and I was able to ssh through that port. I did notice something odd with nmap though:
I'm not sure, but it looks like the proxy script is not listening.
smm,
I found related topic - http://community.activestate.com/faq/komodo-ide-debugger-proxy-pydbgpprox (item 5)
Could it help you?
Thank you for feedback!
Thanks for the link, I will give that a shot...
EDIT: That worked, I ran the following SSH command on my local machine that I use PhpStorm on:
Where xx.xx.xxx.xxx is the IP address of the server running the DBGp proxy script. Then in PhpStorm, under Tools -> Xdebug Proxy -> Configuration I used: