Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000895XdebugUsage problemspublic2012-10-18 18:182012-10-18 22:53
Assigned Toderick 
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

if ($d=="Fri")
    echo "Have a nice weekend!";
    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 [^]

Same question asked on SO is here: [^]
TagsNo tags attached.
Operating System
PHP Version5.3.10
Attached Files

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

-  Notes
derick (administrator)
2012-10-18 22:53

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 18:18 expert New Issue
2012-10-18 22:53 derick Note Added: 0002364
2012-10-18 22:53 derick Relationship added duplicate of 0000842
2012-10-18 22:53 derick Status new => resolved
2012-10-18 22:53 derick Resolution open => duplicate
2012-10-18 22:53 derick Assigned To => derick

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker