Reputation: 30085
Could you guys tell me why xdebug never stops on single-line statements ? I'm C++ guy so excuse me for lame question.
I'm using PhpStorm 5.0.2 as IDE. I tried it in Intellij IDEA Leda EAP as well.
Consider following php code
<?php
$d=date("D");
if ($d=="Fri")
{
echo "Have a nice weekend!";
}
else
echo "Have a nice day!";
?>
If I set break-point on second echo
debugger will never stop there. But if I surround it with curly braces (like in case of first echo
) it will.
It's quite unfortunate behavior which complicates debugging. Is it possible to change it somehow ? Maybe there is some secret xdebug setting ?
Thanks!
Upvotes: 3
Views: 450
Reputation: 30085
Looks like it's a bug in xdebug. I filed it (0000895) in their bug-tracking system. Please add your comments if you have any.
xdebug developer closed the bug with comment "This is a duplicate of 0000842 - and sadly not something I can fix as it has to do with how the PHP interpreter assigns line numbers to generated execution units."
Upvotes: 3