8
votes

I'm using xdebug to debug a php application with phpstorm. Most of the time debugging works. However, I have repeatedly observed the following behavior:

  1. I click "Listen for incoming connections"enter image description here
  2. Do not add a breakpoint
  3. Reload the page in Chrome
  4. See that the page hangs forever
  5. See that phpstorm is not stopped on a breakpoint

It's almost as the the browser thinks it is stopped on a breakpoint, even though it's not. Closing and reopening storm solves the problem temporarily, but the problem always returns. Clicking "stop listening for incoming connections" allows the page to load, but of course prevents me from putting in breakpoints. This behavior persists even if I do add a breakpoint, which is to say, my breakpoint is completely ignored.

If it helps, here's my xdebug config and I'm running php5.5 downloaded from here.

3
1) xdebug/PhpStorm version? 2) Collect xdebug logs and see what it will say there: xdebug.org/docs/all_settings#remote_log . Based on your screenshot you are not in a debugging session at that moment (otherwise debug tool windows would be shown).. plus just having IDE listening on connection should do nothing major -- all what I see on my setup is possibly 0.5-1 sec delay in similar situation.LazyOne
"Clicking "stop listening for incoming connections" allows the page to load, but of course prevents me from putting in breakpoints." Interesting ... because you can add/remove breakpoint at any time. Breakpoint may not be properly registered/removed if there are some issues .. but in IDE they will be set just fine.LazyOne
I have the the same problem, although it works OK for a while. Every now & then I have to restart PHPStorm to clear this problem.TobyG

3 Answers

7
votes

Old question, but recently also started having this issue, on PHPStorm 2016.1

As per image below, under debug settings, unchecking these fixed the issue for me.

enter image description here

2
votes

I've had a similar issue multiple times and I have found it generally occurs after removing a breakpoint which it is currently stopped on while running the debug tool. The execution will continue stopping at the no longer existent break point as though it wasn't removed. The solution I have found is simply to stop the debugging process within PhpStorm and to then start it again, the problem should then be cleared.

-1
votes

I had the same exact issue. If anyone else has this issue, try restarting Apache and MySQL and see if that fixes the issue.