I'm playing with PHPStorm and XDebug. All is working fine, except for an odd quirk:
If I set a breakpoint before launching the script, or while it is already paused, everything works fine. But if I set the breakpoint while the script is running, it is never hit. PHPStorm also doesn't mark it with a checkbox like it does with the working breakpoints. In addition, the "Pause program" option also doesn't work.
It appears that I need to specify in advance, before running the script, where I'll want it to stop next.
My colleague who uses Zend Studio and Zend Debugger also says that this has been the case as long as he can remember.
On the other hand, searching the Internet for this kind of behavior yields nothing. This is odd, I would think that people would have noticed something like that and written about it.
Is there something odd about our script then? It's really not doing much - just looping and calling sleep(1)
, waiting for a signal. Perhaps you cannot pause a sleeping PHP script? But no, that doesn't yield any search results either.
Anybody have any idea why the debugger behaves this way?