Xdebug ignores breakpoints

后端 未结 10 1128
一个人的身影
一个人的身影 2020-12-03 03:41

I am currently trying to get Xdebug to work on our development server. As client I am using netbeans and the connection so far works without problems. But when I try to set

相关标签:
10条回答
  • 2020-12-03 04:08

    Solved! When creating a new project in NetBeans, I first set the root folder of the project to the WordPress theme folder of my WordPress site. So instead, I created a new project with the root of it being the root of the entire WordPress site rather than just its theme, and the breakpoints started to work. Woohoo!

    0 讨论(0)
  • 2020-12-03 04:09

    in my case:

    use system default php.ini configuration 
    

    was not selected in the PHP Executable general settings

    0 讨论(0)
  • 2020-12-03 04:11

    It looks like there is something wrong with the path to the file containing the breakpoint.

    <- breakpoint_set -i 452 -t line -s enabled 
       -f file:///http:/development.xxx.de/users/itsame/index.php -n 15 ->
    

    I've had a similar problem with Eclipse. Only my breakpoints in the index file were accepted and breakpoints in other files—that were included in the index—were ignored.

    I looked in the remote_log file and saw the following:

    <- 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>
    

    I noticed that the path for the breakpoint was all wrong. It turned out that I had to setup Port Mapping in Eclipse. After setting the correct mapping the breakpoints started working. Also my remote_log now shows the correct path:

    <- 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>
    

    I'm not sure if there is an equivalent of the Eclipse Port Mapping configuration in Netbeans, but hopefully I pointed you in the good direction.

    0 讨论(0)
  • 2020-12-03 04:11

    In your php.ini file, set this directive:

    report_zend_debug = 1
    

    I hope this help someone?

    0 讨论(0)
提交回复
热议问题