Netbeans 不会连接到 xdebug。我尝试过以下帖子中的建议:
调试 IDE 与 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