等待连接(netbeans-xdebug)

时间:2013-10-23 19:57:06

标签: php netbeans xdebug

我正在尝试在netbeans中调试我的php代码。

表示代码运行完美但我无法调试它(不会在断点处停止)并且代码正常运行。

我已经尝试了所有可能的解决方法,以便让我的xdebug工作并且在过去的几天里一直困扰着......那里的任何人都可以帮助我解决这个问题。

<。> .ini文件中的xdebug配置:

zend_extension = /usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=mgiplocalhost
xdebug.remote_port=9000

这里的mgiplocalhost是我的虚拟主机。 我已尝试过其他可能性,例如localhost和ip地址,但等待连接仍然存在。

在netbeans-&gt; tools-&gt; options-&gt;调试时,我将端口设置为9000并调试它要求我更改端口,因为端口9000已在使用中。我已经改变了端口,但问题仍然存在。

请尽快帮我解决。请帮帮我。

1 个答案:

答案 0 :(得分:0)

有点晚但是觉得这应该有答案!为了让Xdebug正常工作,我在 php.ini 文件中找到的最小配置是加载扩展的行:

zend_extension=php_xdebug.dll(指向Xdebug site下载的dll)

以下Xdebug设置还放在 php.ini 文件中:

[Xdebug]
xdebug.remote_autostart=On
xdebug.remote_enable=On
xdebug.idekey="netbeans-xdebug"

Xdebug默认端口是9000,这也是Netbeans使用的(工具 - &gt;选项... - &gt; PHP - &gt;调试。)如果正在使用9000,你也可以在Netbeans中设置它为9001,在 php.ini 文件中添加行xdebug.remote_port=9001和其他xdebug设置。

然后在重新启动服务器后尝试一下。

相关问题