View Issue Details

IDProjectCategoryView StatusLast Update
0000895XdebugUsage problems (Wrong Results)public2012-10-18 21:53
ReporterexpertAssigned Toderick 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionduplicate 
PlatformLinuxOSCentOSOS Version6.3
Product Version2.2.1 
Target VersionFixed in Version 
Summary0000895: xdebug never stops on single-line statements
DescriptionXdebug never stops on break-points on single-line statements.

But it works if you surround single-line statement with curly braces.
Steps To ReproduceConsider 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.
Additional InformationThis behavior tested in following IDEs:

1) Intellij IDEA 11
2) PhpStorm 5.0.2
3) Notepad++ with DBGP Plugin v0.0.13.27

Output of my phpinfo is here http://fiddle.jshell.net/BJZwQ/show/

Same question asked on SO is here: http://stackoverflow.com/questions/12940286/xdebug-never-stops-on-single-line-statements
TagsNo tags attached.
Operating System
PHP Version5.3.10

Relationships

duplicate of 0000842 resolvedderick Can't debug conditional statements without a block 

Activities

derick

2012-10-18 21:53

administrator   ~0002364

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.

Issue History

Date Modified Username Field Change
2012-10-18 17:18 expert New Issue
2012-10-18 21:53 derick Note Added: 0002364
2012-10-18 21:53 derick Relationship added duplicate of 0000842
2012-10-18 21:53 derick Status new => resolved
2012-10-18 21:53 derick Resolution open => duplicate
2012-10-18 21:53 derick Assigned To => derick
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)