【发布时间】:2013-07-10 22:13:30
【问题描述】:
需要帮助配置 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)”。
有人可以帮我配置吗? 将不胜感激。
提前致谢。
【问题讨论】:
-
PHP 错误日志中是否有任何错误?还是 Apache 日志?似乎 PHP 没有注册扩展,这就是 Netbeans 无法连接的原因。
-
嗨,谢谢您的回复。如何在 netbeans 中注册扩展?
-
当我运行 phpinfo() 时,它显示我没有安装 xdebub.. 为什么??
-
PHP 日志或 Apache 日志中是否有任何错误?他们应该帮助诊断为什么 xdebug 没有在 PHP 中注册。
-
我花了一点时间调试它,最后发现问题是当netbeans启动xdebug时它转到HTTP://LOCALHOST?XDEBUG_SESSION_START=netbeans-xdebug并且有一个htaccess与重定向混淆。因此,将主机更改为 HTTP://LOCALHOST/index.php 导致它可以正常工作。所以HTTP://LOCALHOST/index.php?XDEBUG_SESSION_START=netbeans-xdebug
标签: php windows apache netbeans xdebug