Search code examples
debuggingphpstormxdebug

Xdebug with PHPStorm 8 -- opens WRONG file at non-existing breakpoint


I am having trouble using Xdebug with PHPStorm. I have searched Google, etc.

I have Xdebug setup on a remote host with my local files mirroring the remote host. I am using the Xdebug Chrome extension.

When I run the debugging through PHPStorm, it OPENS a file and shows a blue-highlighted breakpoint that does NOT exist at that file. It will stay there until I hit "resume" multiple times until I get to the file I actually want to debug. VERY annoying because then the session on Chrome timesout, so I can't debug.

I do not see any code that says xdebug_break(); and I never added a breakpoint to that file. In other words, there are no red markings at the left of the line numbers.

What is going on and how do I fix this? Has anyone else come across this problem?

I have tried skipping and ignoring the file ... still does not work! Yes, I have also viewed breakpoints through a separate window and it does not show the breakpoint that apparently exists.


Solution

  • Check the configuration on PHPStorm stop at first line property and disable it

    enter image description here

    After that go to Run >> Break at first line in PHP scripts

    Try turning it ON and OFF few times. Sometimes it is get stuck in between: showing OFF but in reality it is ON.

    This is a well known issue Read: https://youtrack.jetbrains.com/issue/WI-17389