netbeans 显示“等待连接 (netbeans-xdebug)"; [英] netbeans shows "Waiting For Connection (netbeans-xdebug)"

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

问题描述

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

need help to configure xdebug, for debugging projects from IDE netbeans.

这些是我的组件的特性:

These are the features of my components:

XAMPP 1.8.2

XAMPP 1.8.2

PHP:5.4.16

netbeans:7.3.1

netbeans: 7.3.1

Apache: 2.4.4 (Win32)

Apache: 2.4.4 (Win32)

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

this is the final part of my php.ini file:

 [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)".

when I run phpinfo(), there is no xdebug installed, and when I debug a project from netbeans, it says "Waiting For Connection (netbeans-xdebug)".

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

can someone help me to configure it? would be very appreciated.

提前致谢.

推荐答案

您是否已纠正问题?如果没有,请尝试这个.

Have you rectified the issue ? If not then please try this.

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.

xdebug.remote_host=192.168.1.5 - This is the IPv4 address of my system, I changed to this because I couldn't debug with localhost and 127.0.0.1.

在 NetBeans IDE 中,打开 Tools->;选项 ->PHP ->调试.debugger port 和 Session Id 的值应该与 php.ini 中指定的 port 和 idekey 匹配.

in NetBeans IDE, open Tools-> Options -> PHP -> Debugging. The values of debugger port and Session Id should match with the port and idekey specified in php.ini.

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

Now save php.ini, restart Apache and try to debug.

谢谢约翰逊

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

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