等待连接(netbeans-xdebug)卡住了


waiting for connection (netbeans-xdebug) gets stuck

我使用的是windows 8, Netbeans 8.2, php 5.6, Apache和mysql。我是手动安装的,没有使用像WAMP这样的一体化软件包。

当我点击调试图标(Ctrl+F5)时,它会卡住"等待连接(netbeans-xdebug)";While显示整个页面,在断点处不停止。

我回顾了所有可能的解决方案,但没有一个适合我。如:

  1. 将remote_host从"localhost"到127.0.0.1,甚至到我的机器的ip地址
  2. 将端口从9000更改为其他端口。同时检查"Session-ID = netbeans-xdebug"
  3. 设置默认浏览器"在Netbeans
  4. 检查https://xdebug.org/wizard.php并遵循
  5. 说明
  6. 设置日期。php.ini
  7. 检查防火墙(只要我能找到我的防火墙不阻止连接)
  8. 重新启动httpd.exe (Apache)和netbeans和浏览器

下面是一些从我的系统中获得的信息:

从https://xdebug.org/wizard.php

:

定制安装说明

总结

Xdebug安装:2.5.0rc1
服务器API: Apache 2.0 Handler
Windows: yes -编译器:MS VC11 -架构:x64
Zend Server: no
PHP版本:5.6.27
Zend API编号:220131226
PHP API编号:20131226
?Debug Build: no
线程安全构建:yes
配置文件路径:C:'Windows
配置文件:C:'php'php.ini
扩展目录:ext
您已经在运行最新的Xdebug版本

From php -m command:


(PHP模块)bcmath
日历


. (我故意删掉的)
(Zend模块)
Xdebug

From netstat | findstr 9000

TCP 127.0.0.1:9000 mycomputername:62936 CLOSE_WAIT
TCP 127.0.0.1:62936 mycomputername:9000 FIN_WAIT_2
TCP [::1]:9000 mycomputername:62935 CLOSE_WAIT
TCP [::1}:62935 mycomputername::9000 FIN_WAIT_2

最后但并非最不重要的是在php.ini中没有[Xdebug]部分!!有一些行,但是作为一个单独的部分,就像有些人说的那样,什么都没有所以在文件的末尾,我添加了这些行:

[xdebug]
Zend_extension = php_xdebug-2.5.0rc1-5.6-vc11-x86_64.dll
xdebug。Remote_enable = 1
xdebug。Remote_handler = "dbgp"
xdebug。Remote_enable = on
xdebug。Remote_host = "localhost"
xdebug。Remote_port = 9000

不要在Windows上使用xdebug 2.5 RC -它有问题(不工作-无论使用什么IDE,无论是NetBeans还是PhpStorm)。

现在使用稳定版xdebug 2.4.1

  • https://bugs.xdebug.org/view.php?id=1361
  • https://bugs.xdebug.org/view.php?id=1366

[xdebug]

xdebug.remote_host = 127.0.0.1

代替

[xdebug]

xdebug。Remote_host = "localhost"

我也尝试了很多不同的东西。不确定我在网上找到的建议是否有帮助。我最后的改变,实际上得到它的工作是将项目url从http切换到https(项目-属性-运行配置-项目url)。