等待连接(netbeans-xdebug)卡住了 [英] waiting for connection (netbeans-xdebug) gets stuck

查看:65
本文介绍了等待连接(netbeans-xdebug)卡住了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

当我单击调试图标 (Ctrl+F5) 时,它会卡在等待连接 (netbeans-xdebug)"上;while 完全显示页面,不会在断点处停止.

我查看了所有可能的解决方案,但没有一个对我有用.如:

  1. 从localhost"更改 remote_host到 127.0.0.1 甚至到我机器的 IP 地址
  2. 将端口从 9000 更改为不同的端口.还要检查Session-ID = netbeans-xdebug"
  3. 设置默认的网络浏览器"在 Netbeans 上
  4. 检查 https://xdebug.org/wizard.php 并按照说明操作
  5. 在 php.ini 中设置 date.zone
  6. 检查防火墙(尽我所能发现我的防火墙没有阻止连接)
  7. 重新启动 httpd.exe (Apache) 和 netbeans 以及浏览器

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

来自https://xdebug.org/wizard.php:
<块引用>

量身定制的安装说明

总结

Xdebug 安装:2.5.0rc1
服务器 API:Apache 2.0 处理程序
Windows:是 - 编译器:MS VC11 - 架构:x64
Zend 服务器:没有
PHP 版本:5.6.27
Zend API 编号:220131226
PHP API 编号:20131226
?调试版本:无
线程安全构建:是
配置文件路径:C:\Windows
配置文件:C:\php\php.ini
扩展目录:ext
您已经在运行最新的 Xdebug 版本

来自 php -m 命令:

<块引用>

[PHP 模块]
数学数学
日历
.
.
.(我是故意删的)
[Zend 模块]
调试

来自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.

I am using windows 8, Netbeans 8.2, php 5.6, Apache and mysql. I installed them manually and did not use all-in-one package like WAMP.

When I click on debugging icon (Ctrl+F5) it gets stuck on "waiting for connection (netbeans-xdebug)" while shows the page completely without stopping at the break points.

I reviewed all the possible solutions but none of them worked for me. Such as:

  1. Changing the remote_host from "localhost" to 127.0.0.1 or even to the ip address of my machine
  2. Changing the port from 9000 to different ports. Also checking the "Session-ID = netbeans-xdebug"
  3. Setting the default "web browser" on Netbeans
  4. Checking https://xdebug.org/wizard.php and following the instruction
  5. Setting the date.zone in php.ini
  6. Checking the firewall (as far as I could find my firewall does not block the connection)
  7. Restarting httpd.exe (Apache) and netbeans and browser

Here are some info which gained from my system:

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

Tailored Installation Instructions

Summary

Xdebug installed: 2.5.0rc1
Server API: Apache 2.0 Handler
Windows: yes - Compiler: MS VC11 - Architecture: x64
Zend Server: no
PHP Version: 5.6.27
Zend API nr: 220131226
PHP API nr: 20131226
?Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: C:\php\php.ini
Extensions directory: ext
You're already running the latest Xdebug version

From php -m command:

[PHP modules]
bcmath
calendar
.
.
. (I deleted them intentionally)
[Zend modules]
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

Last but not least in php.ini there was no [Xdebug] section!! there was some lines but as a separated section like some people said there was nothing so at the end of file I added these lines:

[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

I appreciate any suggestion.

解决方案

Do not use xdebug 2.5 RC on Windows -- it has issues (does not work -- regardless what IDE is used, be it NetBeans or PhpStorm).

Use stable xdebug 2.4.1 for now.

这篇关于等待连接(netbeans-xdebug)卡住了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆