Xdebug忽略了断点

enr*_*cog 19 php eclipse netbeans xdebug

我目前正在尝试让Xdebug在我们的开发服务器上工作.作为客户端我使用netbeans和连接到目前为止工作没有问题.但是当我尝试在netbeans中设置一个断点时,它就会被忽略.

是的,我已经谷歌搜索了几个小时,并在这里找到了一些完全符合我描述的问题: SO 1 SO 2

但这似乎并没有为我解决.该Xdebug模块通过zend_extension = path/to/xdebug加载.所以在

/etc/php5/conf.d/xdebug.ini

我还查看了php5/apache和php5/cli php.ini以确保它没有加载extension = somewhere那里.我还检查了phpinfo()找到的"解析的其他.ini文件",似乎没有其他地方加载.

通过执行php -m我可以看到加载的Xdebug模块

[PHP Modules]

并在

[Zend Modules]

不确定这是否表明它仍然被加载两次或者它是否正常?如果我zend_extension=/path/to/xdebug.soconf.d/xdebug.ini它删除它仍然不再加载.所以我真的认为它只是装在那里.

如果我设置了remote_log选项,则看到Netbeans正在尝试设置某些内容:

<- breakpoint_set -i 452 -t line -s enabled 
   -f file:///http:/development.xxx.de/users/itsame/index.php -n 15
-> <response xmlns="urn:debugger_protocol_v1"
    xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" 
          transaction_id="452" state="enabled" id="258870001">   
    </response>
Run Code Online (Sandbox Code Playgroud)

但它似乎没有任何效果(看起来几乎和我上面发布的其他SO问题一样.但是如果我在php代码中做了一个手动xdebug_break(),它就会正确地处理它.

PHP版本是5.2.6,Xdebug是2.1.我有什么建议可以看看下一个吗?

Jer*_*ege 10

看起来包含断点的文件的路径有问题.

<- breakpoint_set -i 452 -t line -s enabled 
   -f file:///http:/development.xxx.de/users/itsame/index.php -n 15 ->
Run Code Online (Sandbox Code Playgroud)

我和Eclipse有类似的问题.只接受索引文件中的断点,并忽略其他文件中包含在索引中的断点.

我查看了remote_log文件并看到以下内容:

<- breakpoint_set -i 260 -t line 
   -f file:///~jeroen/workspace/fieg/wp-content/plugins/fieg/fieg.php -n 22-> 
<response xmlns="urn:debugger_protocol_v1" 
   xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" 
   transaction_id="260" id="48060002"></response>
Run Code Online (Sandbox Code Playgroud)

我注意到断点的路径都是错的.事实证明,我必须在Eclipse中设置端口映射.设置正确的映射后,断点开始工作.此外,我的remote_log现在显示正确的路径:

<- breakpoint_set -i 333 -t line 
   -f file:///Users/jeroen/Workspace/fieg/wp-content/plugins/fieg/fieg.php -n 12->     
<response xmlns="urn:debugger_protocol_v1" 
   xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" 
   transaction_id="333" id="48080005"></response>
Run Code Online (Sandbox Code Playgroud)

我不确定在Netbeans中是否有相当于Eclipse Port Mapping的配置,但希望我指出你的方向很好.