Netbeans无法连接xdebug。我尝试了以下帖子中的建议:
netbeans显示“等待连接(netbeans-xdebug)”
但这并没有解决我的问题。
看起来Netbeans连接到了xdebug,因为当它等待连接时,所有发往Web服务器[Apache2]的请求都被阻止了。此外,端口[9001]似乎正在使用中:
roxy@Pixy011 ~ $ sudo nmap -sS -O 127.0.0.1
Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-28 20:48 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000029s latency).
Not shown: 990 closed ports
PORT STATE SERVICE
22/tcp open ssh
139/tcp open netbios-ssn
443/tcp open https
445/tcp open microsoft-ds
631/tcp open ipp
902/tcp open iss-realsecure
3306/tcp open mysql
8080/tcp open http-proxy
8081/tcp open blackice-icecap
9001/tcp open tor-orport <---- Opened by java
xdebug.ini:[我已确认它在phpinfo中被加载]
zend_extension=/usr/lib/php5/20100525/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9001
xdebug.idekey="netbeans-xdebug"
Netbeans配置:
Debugger port: 9001
Session ID: netbeans-xdebug
Stop at first line: Checked
All other options are unchecked
项目属性:
Host: 127.0.0.1
Port: 9001
编辑: 我注意到Netbeans没有将XDEBUG_SESSION_STOP附加到URL中。我认为这与问题无关,因为只有在关闭调试会话后,Netbeans才会打开页面。
我还禁用了SELinux。