Just to know, the purpose of this setup is to use debugging while working on
a Facebook app (into an iframe). But this doesn't matter in the explanation.
Here is the setup. Running on 2 computer on a local network :
192.168.0.1 is MyServer on Debian / Nginx / php5 with xdebug
192.168.0.2 is MyWorkComp on Win7 / Eclipse IDE / Firefox with xdebug
extension
Both computer are behind a router 192.168.0.254
The whole local network can be access by it's external ip 80.xx.ext.ip .
Running the pydbgpProxy on the server.
When I call a debug session throught Firefox accessing local address
192.168.0.1 , it works, yeah ! IDE connect to xdebug throught proxy no
problemo. Running a normal debug session.
- xdebug.remote.log gets updated correctly
- $_SERVER[REMOTE_ADDR] => 192.168.0.2 (myWorkComp)
But ! When I call a debug session throught the external ip (80.xx.my.ip),
the whole debug session doesn't start. I get an instant response (debug
session not launched at all).
- xdebug.remote.log gets no update. So I don't know where to correct
that.
- When I use ?XDEBUG_SESSION_START=myIDE, a cookie XDEBUG_SESSION=myIDE
is created. So there's something going on... ?
- $_SERVER[REMOTE_ADDR] => 192.168.0.254 (the router internal ip)
Here is php.ini stuff :
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable = on
xdebug.remote_handler = "dbgp"
xdebug.remote_connect_back = 1
#xdebug.remote_host = 192.168.0.2
#xdebug.remote_host = 192.168.0.1
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_mode = req
and the command to launch the proxy :
./bin/pydbgpproxy -i 192.168.0.1:8999 -d 127.0.0.1:9000
So, basically, I want to access my app throught it's external ip and be able
to launch a remote debug session.
The pydbgpproxy is launched and the IDE is connected to it, what am I doing
wrong ?
Hope I'm clear and what I want a do is possible, maybe I don't understand
something somewhere. Help :)
ps. I've seen a guy who did this
http://www.uebersoftware.com/2009/07/fb-series-locally-debug-your-php-facebook-app/
but
he was running it's server on it's working computer I think, not with remote
debugging...
Received on Fri Feb 25 2011 - 08:46:44 GMT
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST