使用netbeans配置php调试有困难

时间:2012-02-11 08:55:27

标签: php debugging netbeans xdebug

更新2:

没关系,弄清楚,在netbeans中我) tools > options > general > web browser > edit > arguments的额外-remote {url})-remote {url},所以我将其更改为http://localhost/PhpProject1/index.php?XDEBUG_SESSION_START=netbeans-xdebug

我现在已经在我的新笔记本电脑上调试了netbeans。

更新1:

我一直在比较我的旧笔记本电脑和我的新笔记本电脑,因为调试工作在我的旧笔记本电脑上。我看到的唯一区别是当我点击调试时浏览器中的url。

旧笔记本电脑: http://localhost/PhpProject1/index.php?XDEBUG_SESSION_START=netbeans-xdebug)

新笔记本电脑: )

当我手动从新笔记本电脑网址中删除结尾waiting for connection (netbeans-xdebug)时,调试开始工作...为什么新的笔记本电脑设置在最后有一个')'并且旧设置没有?< / p>

原始问题:

我正在尝试通过localhost上的netbeans配置xdebug进行php调试。我曾尝试过几个指南,但似乎无法让它发挥作用。我已经在旧笔记本电脑上配置了它,但似乎无法记住如何。目前,当我添加断点并单击“调试项目”时,它会打开一个浏览器并显示zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so xdebug.remote_enable=On xdebug.remote_host="localhost" xdebug.remote_port=9000 xdebug.remote_handler="dbgp" xdebug.remote_enable=1 。 “跳过”和“步入”选项被禁用。

如何解决此问题?

到目前为止,我已完成以下操作:

我已经为netbeans安装了灯泡,php5-xdebug和php插件。

我在/etc/php5/apache2/conf.d/xdebug.ini中有以下内容:

service apache2 restart

我已完成xdebug

我可以看到phpinfo();已启用PHP 5 Interpreter = /usr/bin/php Bebugger Port = 9000 Session ID = netbeans-xdebug

在netbeans中 - 工具&gt;选项&gt; php,我做了以下事情:

{{1}}

2 个答案:

答案 0 :(得分:1)

听起来像netbeans正在等待php回调。你有没有把xdebug添加到php?

有关详细信息,请参阅this article

答案 1 :(得分:0)

问题的解决方案可以在原始问题的更新2中看到,即:

在netbeans中,我) tools > options > general > web browser > edit > arguments的额外-remote {url})-remote {url},因此我将其更改为{{1}}。

相关问题