php – 等待连接到XDEBUG的Netbeans

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – 等待连接到XDEBUG的Netbeans脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
Netbeans不会连接到xdebug.我试过以下帖子的建议:

Debugging IDE’s port connection to XDebug: “Waiting to Connect”

netbeans shows “Waiting For Connection (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

ubuntu 13.04 64bIT PHP 5.4.9-4 Xdebug v2.2.3 netbeans 7.4
我有同样的问题,并通过以下方式解决
1.按照说明继续编译自己的xdebug.so
2.在netbean 7.4一般选项(对不起,我没有声望10发布图片)
测试连接.确保代理服务器上的设置正确:
对我说“没有代理人”正在运作.
3.在PHP选项调试选项卡中将xdebug设置端口更改为9001或9000以外的其他设置.
我选择9002,但你可以尝试,直到找到一个免费端口(如果端口不是免费的,请告诉你)
4.在PHP.ini中为/etc/PHP5/conf.d/20-xdebug.ini中的ubuntu用户

5. sudo service apache2 restart

这样做之后我可以再次调试PHP.

脚本宝典总结

以上是脚本宝典为你收集整理的php – 等待连接到XDEBUG的Netbeans全部内容,希望文章能够帮你解决php – 等待连接到XDEBUG的Netbeans所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。