Xdebug ignores breakpoints

后端 未结 10 1127
一个人的身影
一个人的身影 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 03:50

    The question mentioned that the xdebug.ini file exists, but does not report its contents. My default installation's file only included:

    zend_extension=/usr/lib/php5/20100525/xdebug.so
    

    But in order for debugging to actually happen, it must be enabled. Add this line:

    xdebug.remote_enable=1
    

    Then phpinfo() will report a functioning xdebug:

    enter image description here

    0 讨论(0)
  • 2020-12-03 03:51

    Yet another possible solution, the only one that worked for me, after trying everything in this post and in many others...

    I'm debugging a PHP project through XDEBUG on Eclipse Neon on Windows. The source is remote Linux, mounted locally as a drive through SFTP. It's probably my own fault that this isn't set up correctly...

    In Eclipse, right-click your project, then select Configure, then Add PHP Support. Immediately, the DLTK indexing started; before that it wouldn't start no matter what.

    Then I had to open my source and set the breakpoints through Remote File Explorer. I hope this helps someone.

    0 讨论(0)
  • 2020-12-03 03:53

    Go to: Project > Properties > Run Configuration > Advanced (button)

    Remove all the mappings from the "Path Mapping" if you are not using Xdebug for remote debugging. This would help to fix this issue.

    0 讨论(0)
  • 2020-12-03 03:54

    I came across this post trying to solve my xdebug problem in eclipse not breaking at break points for a web application. I found the comments herein very useful. Also, this post http://www.devside.net/wamp-server/netbeans-waiting-for-connection-netbeans-xdebug-issue came in very handy to solve my issue. I just had to set the following flag in my relevant php.ini.

    xdebug.remote_enable=1

    xdebug would continuously wait on the session but after setting the remote debug flag the session wait issue, breaking point issue as well the xdebug log file that I had defined also started logging transactions.

    0 讨论(0)
  • 2020-12-03 03:54

    I had the same problem: Eclipse breakpoints did not work, xdebug_break() did work. My problem were spaces in the path:

    <- breakpoint_set -i 1323 -t line -f file:///Users/admin/Documents/projects/something/path%2520with%2520space/web/index.php -n 223
    -> 
    <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="1323" id="385680235"></response>
    

    After changing the path to something without spaces the breakpoints in Eclipse worked fine.

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

    For me the problem was "Project properties > Source > Web Root:" was not set (it had a default " as its value).

    After setting it to be my web root on disk, the breakpoints started working.

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