View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001559 | Xdebug | Code Coverage | public | 2018-06-13 15:52 | 2019-02-01 17:03 |
Reporter | dtowell | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
OS | CentOS | OS Version | 7 | ||
Product Version | 2.6.0 | ||||
Summary | 0001559: Missing lines from "top level" code | ||||
Description | Unexecuted "top level" code lines are not included in coverage report, yet similar unexecuted code lines inside a function is reported are. | ||||
Steps To Reproduce | <?php produces: Array ) Observe 5 & 6 are missing. | ||||
Tags | No tags attached. | ||||
Operating System | CentOS 7 | ||||
PHP Version | 7.1.15-7.1.19 | ||||
|
After poking around xdebug source for a while. I have the following observations that may be helpful, but YMMV. (1) Changes to xdebug_set_filter() do not effect the results. (2) A hinting flag may conflict between xdebug and PHP/Zend (3) I think the problem may be in "prefilling" -- prefill_from_oparray(), but cannot easily test without building. (4) xdebug_func_format() has a default case that seem related (code not in a function or class method), but that might be a false trail too. |
|
In xdebug_compile_file(), the following line prevents file-level processing for code coverage because the globals have not yet been set. if (XG(do_code_coverage) && XG(code_coverage_unused) && (op_array->fn_flags & ZEND_ACC_DONE_PASS_TWO)) { I worked around the problem using auto_prepend_file for now. I understand why you might not want to address this issue, but it still seems like a bug to me. |
|
appears to be fixed in 2.6.1 (php 7.1.23) |
|
I don't think there were any changes related to this between Xdebug 2.6.0 and 2.6.1, but I'll take the "it works" now. thanks for reporting! |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-06-13 15:52 | dtowell | New Issue | |
2018-06-18 19:28 | dtowell | Note Added: 0004674 | |
2018-07-11 21:06 | dtowell | Note Added: 0004681 | |
2018-10-27 21:53 | dtowell | Note Added: 0004714 | |
2019-02-01 17:03 | derick | Note Added: 0004866 | |
2019-02-01 17:03 | derick | Status | new => resolved |
2019-02-01 17:03 | derick | Resolution | open => no change required |
2019-02-01 17:03 | derick | Assigned To | => derick |