需要帮助配置 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/