php – 等待连接到XDEBUG的Netbeans

前端之家收集整理的这篇文章主要介绍了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]似乎正在使用中:

  1. roxy@Pixy011 ~ $sudo nmap -sS -O 127.0.0.1
  2.  
  3. Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-28 20:48 EST
  4. Nmap scan report for localhost (127.0.0.1)
  5. Host is up (0.000029s latency).
  6. Not shown: 990 closed ports
  7. PORT STATE SERVICE
  8. 22/tcp open ssh
  9. 139/tcp open netbios-ssn
  10. 443/tcp open https
  11. 445/tcp open microsoft-ds
  12. 631/tcp open ipp
  13. 902/tcp open iss-realsecure
  14. 3306/tcp open MysqL
  15. 8080/tcp open http-proxy
  16. 8081/tcp open blackice-icecap
  17. 9001/tcp open tor-orport <---- Opened by java

xdebug.ini:[我已经确认它是在PHPinfo()中加载的]

  1. zend_extension=/usr/lib/PHP5/20100525/xdebug.so
  2.  
  3. xdebug.remote_autostart=1
  4. xdebug.remote_enable=1
  5. xdebug.remote_handler="dbgp"
  6. xdebug.remote_mode="req"
  7. xdebug.remote_host="127.0.0.1"
  8. xdebug.remote_port=9001
  9. xdebug.idekey="netbeans-xdebug"

Netbeans配置:

  1. Debugger port: 9001
  2. Session ID: netbeans-xdebug
  3. Stop at first line: Checked
  4. All other options are unchecked

项目属性

  1. Host: 127.0.0.1
  2. 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用户

zend_extension=/usr/lib/PHP5/20100525/xdebug.so #where you ave put your reconpiled xdebug.so
[xdebug]
xdebug.remote_autostart=0
xdebug.remote_enable=1
xdebug.remote_handler=”dbgp”
xdebug.remote_mode=”req”
xdebug.remote_port=9002 # the port you have found free and set in netbeans above
xdebug.remote_host=127.0.0.1
xdebug.profiler_enable=0
xdebug.profiler_output_dir=”/tmp/”
xdebug.idekey=”netbeans-xdebug”
xdebug.remote_log=”/home/#user_name#/xdebug.log” #your user name

5. sudo service apache2 restart

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

猜你在找的PHP相关文章