View Issue Details

IDProjectCategoryView StatusLast Update
0000237XdebugUncategorizedpublic2007-01-23 10:58
Reporterproofek Assigned Toderick  
Status resolvedResolutionnot fixable 
Summary0000237: xdebug_get_code_coverage() getting incorrect results
DescriptionIt looks like that data gathered with xdebug_get_code_coverage() function are not quite correct.

When executing the code above it is saying that only 3 last lines has been executed, while it is obvious (I think) that assigning to a variable should be executed as well.

$strQuery = 'SELECT
            field1 = "'.$strTransactionCode.'"
            AND field2 = "'.$strReference.'"
            AND field3 = '.$intVersion;
Additional InformationHowever if I enclose the whole query within double quotes it says that it's been executed.

I has segmentaion fault with rc2, that's why i can't check that with rc2.
TagsNo tags attached.
Operating SystemLinux, Debian Dapper
PHP Version5.1.6



2007-01-22 20:06

administrator   ~0000556

I checked this with VLD, and it seems the Zend Engine sees the assignment happening on the last line of the whole statement. As the engine doesn't expose the correct data, Xdebug can not return the correct information. However, it is possible to ask Xdebug to also tell which lines are executable. You need to do this then:
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);


2007-01-23 10:42

reporter   ~0000557

I hasn't helped. It it still reporting no execution at this point.
Additionally for some of my files (where there is lots of includes) id dies trying to include one of the files and ends with segmentation fault. It's not happening when I remove XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE.


2007-01-23 10:58

administrator   ~0000558

Of course it doesn't show it - as there is nothing to show for that point. All those parameters to is tell you which lines *can* be executed according to the engine. For the segmentation fault, upgrade to the CVS version - that should be fixed.

Issue History

Date Modified Username Field Change
2007-01-22 17:26 proofek New Issue
2007-01-22 20:06 derick Status new => resolved
2007-01-22 20:06 derick Resolution open => not fixable
2007-01-22 20:06 derick Assigned To => derick
2007-01-22 20:06 derick Note Added: 0000556
2007-01-23 10:42 proofek Status resolved => feedback
2007-01-23 10:42 proofek Resolution not fixable => reopened
2007-01-23 10:42 proofek Note Added: 0000557
2007-01-23 10:58 derick Status feedback => resolved
2007-01-23 10:58 derick Resolution reopened => not fixable
2007-01-23 10:58 derick Note Added: 0000558
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)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized