为什么XDebug忽略来自NetBeans 6.8的断点? [英] Why is XDebug ignoring breakpoints from NetBeans 6.8?

查看:152
本文介绍了为什么XDebug忽略来自NetBeans 6.8的断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 10.04笔记本电脑上运行PHP 5.3.2,Apache 2.2.14和xdebug 2.2.0rc1,我正在Netbeans 6.8中的localhost上设置调试。



我的问题是我在Netbeans中设置的断点被忽略。否则它似乎正常工作。例如,我得到漂亮的var_dumps,xdebug跟踪,xdebug远程日志,我也可以勾选框,以便它在PHP脚本的第一行断开。



在其他网站和SO问题(例如 SO1 SO2 SO3 )我已经检查了以下所有内容:




  • 我正在编辑的php.ini文件正在使用

  • 将xdebug加载为zend_extension = / full / path / to / xdebug.so(不是extension = xdebug.so)

  • 线程安全在PHP中禁用,我正在使用xdebug的非线程安全版本

  • 在xdebug远程日志中断点的路径是正确的(请参阅下面的代码片段,该片段中的路径和其他未显示的路径是cor rect)

     <  -  breakpoint_set -i 1014 -t line -s enabled -f file:/// var / www / mockup / test.php -n 8  - > < response xmlns =urn:debugger_protocol_v1xmlns:xdebug =http://xdebug.org/dbgp/xdebugcommand =breakpoint_settransaction_id =1014state =enabledid =135610002>< ; / response> 


  • 手动调用xdebug_break()工作




我也尝试在Netbeans项目属性中设置服务器路径和项目路径,因为感觉这样可能是问题,但它没有帮助。目前,我有服务器路径作为 / var / www / mockup 和项目路径为 / common / rsync / Dropbox / active-archives / code / Locus /模型



但是, / var / www / mockup 是一个符号链接无论如何,我甚至不知道这是必要的吗?无论我是否指定路径映射,它不起作用。

解决方案

Xdebug(通过PHP)不支持符号链接( http://bugs.xdebug.org/view.php有问题?id = 627 )。 PHP / Xdebug总是使用完全扩展的链接,所以你需要确保netbeans设置一个断点,如:

  breakpoint_set -i 1014 -t line -s enabled -f file:///common/rsync/Dropbox/active-archives/code/Locus/mockup/test.php 

您将必须设置路径映射。在验证了breakpoint_set包含正确的路径后,它应该可以工作。


I am running PHP 5.3.2, Apache 2.2.14 and xdebug 2.2.0rc1 on my Ubuntu 10.04 laptop, and I am trying to set up debugging on localhost in Netbeans 6.8.

My problem is that breakpoints I set in Netbeans are being ignored. Otherwise it it seems to work correctly. For example, I get pretty var_dumps, xdebug traces, xdebug remote logs and I can also tick the box so that it breaks on the first line of the PHP script.

Based on other websites and SO questions (e.g. SO1, SO2, SO3) I've checked all of the following:

  • That the php.ini file I am editing is being used
  • That xdebug is loaded as zend_extension=/full/path/to/xdebug.so (not extension=xdebug.so)
  • Thread safety is disabled in PHP and I am using the non-thread safe version of xdebug
  • That the path to the breakpoints is correct in the xdebug remote log (see code snippet below this list, the paths in that snippet and others not shown are correct)

    <- breakpoint_set -i 1014 -t line -s enabled -f file:///var/www/mockup/test.php -n 8 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="1014" state="enabled" id="135610002"></response>
    

  • Manual calls to xdebug_break() work

I have also tried to set up the server path and project path in the Netbeans project properties because it feels like that could be the problem, but it hasn't helped. Currently I have server path as /var/www/mockup and project path as /common/rsync/Dropbox/active-archives/code/Locus/mockup

However, /var/www/mockup is a symlink to the longer path anyway so I don't even know if this is necessary? It does not work whether I specify the path mapping or not...

解决方案

Xdebug (through PHP) doesn't support symbolic links yet (there is an issue at http://bugs.xdebug.org/view.php?id=627). PHP/Xdebug always uses the fully expanded link so you will need to make sure netbeans sets up a breakpoint like:

breakpoint_set -i 1014 -t line -s enabled -f file:///common/rsync/Dropbox/active-archives/code/Locus/mockup/test.php

You will have to set-up a path mapping. After you've verified that the breakpoint_set include the correct path, it should work.

这篇关于为什么XDebug忽略来自NetBeans 6.8的断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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