无法将xdebug配置为Netbeans

时间:2012-03-15 12:03:55

标签: php apache netbeans xdebug

我已将xdebug配置为Netbeans IDE。我的机器已经安装了XAMPP 1.7.4。它有php 5.3.5。

(在我注意到的phpinfo()页面中,

Apache版本 - Apache / 2.2.17(Win32)mod_ssl / 2.2.17 OpenSSL / 0.9.8o PHP / 5.3.4
  调试构建 - 没有 )

xdebug的版本是“php_xdebug-2.1.1-5.3-vc9.dll”。 我把这个dll保存在文件夹(目录)C \:xampp \ php \ ext。

我完成了php.ini文件中的设置,位于文件夹 - \ php \ php.ini下。

我已在php.ini文件

中完成了以下设置
zend_extension_ts="C:xamppphpextphp_xdebug-2.1.1-5.3-vc9.dll"

;xdebug.remote_enable=true
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir="C:xampptmp"

后来我尝试调试php项目..调试器无法正常工作。但是在IDE中“等待连接(netbeans-xdebug)”消息正在传递。

我请你告诉我。

1 个答案:

答案 0 :(得分:0)

  1. 取消注释remote_enable = true ,有必要

  2. 启用xdebug.remote_log ,例如xdebug.remote_log =“/ tmp / xdebug.log”,它应告诉您xdebug是否尝试连接到IDE

  3. 如果它没有尝试连接,请在代码中调用xdebug_break(),这会强制调用IDE

  4. 另请注意,您必须定义一个env变量以从CLI进行调试,对于浏览器,有许多扩展。详细信息:http://xdebug.org/docs/remote