xDebug remote debugging using netbeans
I'm trying to use xdebug to debug remotely to my server, I have the following in my php ini on the server:
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
[XDebug]
xdebug.remote_enable = 1
;xdebug.remote_host = "<MYIP>"
xdebug.remote_port = 9000
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_connect_back = 1
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/var/log/xdebug.log"
I've tried with just remove_host and just remote_connect_back and neither seems to get a connection. I receive a waiting for connection output in netbeans.
I've ensured that the port 9000 is open on the server for outgoing and incoming tcp connections and when starting the debugger I get this output from tcpdump on the remote server:
04:48:05.003307 server.25096 > local.9000: S 49319开发者_如何学Python161:49319161(0) win 5840 (DF)
04:48:08.000027 server.25096 > local.9000: S 49319161:49319161(0) win 5840 (DF)
04:48:14.000034 server.com.25096 > local.9000: S 49319161:49319161(0) win 5840 (DF)
04:48:26.000018 server.com.25096 > local.9000: S 49319161:49319161(0) win 5840 (DF)
04:48:30.290025 server.com.25085 > local.9000: S 4252863523:4252863523(0) win 5840 (DF)
04:48:50.000018 server.com.25096 > local.9000: S 49319161:49319161(0) win 5840 (DF)
04:49:38.000026 server.com.25096 > local.9000: S 49319161:49319161(0) win 5840 (DF)
I'm not familiar with tcpdump but it looks like only a one way communication, I'm just not sure from which side?
Also my project configuration in netbeans is:
Remote Website FTP SFTP
Project Url: http://site.ca
Index (blank)
Arguments (blank)
Remote Connection: (set and tested)
Upload Directory: (blank)
Upload Files: Mnaually
Preserver..: unchecked
upload directly..: unchecked
Advanced:
-- Open browser
-- Path Mapping set server and locally to /public_html/ folders both with trailing dashes -- No debugger proxy
I've been able to get netbeans working with xdebug locally for web and cli but can't seem to get it working for remote. Any help is greatly appreciated.
Cheers,
Jay
Does your Netbeans know that it has to listen to 9000 for XDebug?
I'm bit confused by your account but in case your apache isn't running locally then you have to specify a remote_host-IP, so XDebug can connect back. Though then your remote_connect_back should have worked.
Did you configure your local firewall to allow incoming requests on your XDebug-port?
Best
Raffael
精彩评论