php - netbeans 显示 "Waiting For Connection (netbeans-xdebug)"

标签 php windows apache netbeans xdebug

需要帮助配置 xdebug,以便从 IDE netbeans 调试项目。

这些是我的组件的功能:

XAMPP 1.8.2

PHP:5.4.16

netbeans:7.3.1

Apache:2.4.4 (Win32)

这是我的 php.ini 文件的最后一部分:

 [XDebug]
 zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9-nts.dll"
 ;xdebug.profiler_append = 0
 ;xdebug.profiler_enable = 1
 ;xdebug.profiler_enable_trigger = 0
 xdebug.profiler_output_dir = "C:\xampp\tmp"
 ;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
 xdebug.remote_enable = 1
 xdebug.remote_handler = "dbgp"
 xdebug.remote_host = "127.0.0.1"
 ;xdebug.trace_output_dir = "C:\xampp\tmp"

当我运行 phpinfo() 时,没有安装 xdebug,当我从 netbeans 调试项目时,它显示“等待连接 (netbeans-xdebug)”。

有人可以帮我配置吗? 将不胜感激。

提前致谢。

最佳答案

您解决了这个问题吗?如果没有那么请试试这个。

1.) php.ini文件内容

[xDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
;xdebug.remote_host="localhost:81"
xdebug.remote_host=192.168.1.5
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

xdebug.remote_host=192.168.1.5 - 这是我系统的 IPv4 地址,我改成这个是因为我无法使用 localhost 进行调试127.0.0.1.

在 NetBeans IDE 中,打开 Tools-> Options -> PHP -> Debugging。调试器端口和 session ID的值应与php.ini中指定的端口和idekey匹配。

现在保存 php.ini,重启 Apache 并尝试调试。

谢谢约翰逊

关于php - netbeans 显示 "Waiting For Connection (netbeans-xdebug)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17613726/

相关文章:

php - 计算一个数组中某个值在另一个数组中出现的次数

php - 参数数组MySQLi的动态绑定(bind)

c++ - C++ 中 ü 的 ASCii 值

windows - Windows Powershell脚本中的服务解释问题

Python:ModuleNotFoundError:没有名为 'stats' 的模块

php - 让 URL 动态看起来不错

php - 错误 1005 (HY000) : Can't create table 'db.POSTS' (errno: 150)

php - 制作一个新的sql表,其中一个字段从另一个表字段复制数据

Apache Directory Studio 未打开

python - python 中 apache/modwsgi 应用程序的内存模型?