View Issue Details

IDProjectCategoryView StatusLast Update
0001753XdebugUncategorizedpublic2020-03-06 11:32
ReporterSvetlanaZemAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.9.1 
Target Version2.9.3Fixed in Version2.9.3 
Summary0001753: Resolved breakpoints use information from wrong files
DescriptionXdebug behaviour depends on a number of empty lines in another file. That results into stopping on breakpoint on a correct line, next line or not stopping at all.

The problem isn't reproducible on Xdebug 2.9.0.

https://youtrack.jetbrains.com/issue/WI-51166
Steps To ReproduceDownload attached php files and place a breakpoint in PageIndex ln 10 $var = 1;
Note the blank lines in PageIndex and SkeletonPage, they are important.

Scenario#1: with this files as is
this breakpoint will not trigger/stop code execution

Scenario#1: add a blank line in SkeletonPage before func() so that protected function func() is on line 11
the breakpoint will now stop as it should

Scenario#1: remove 2 blank lines from SkeletonPage before func() so that protected function func() is on line 9
the breakpoint will now stop in the +1 line
Additional InformationXdebug logs for each scenario and Xdebug 2.9.0 (working correctly) vs. Xdebug 2.9.1 are also attached.
TagsNo tags attached.
Operating System
PHP Version7.3.5-7.3.9

Activities

SvetlanaZem

2020-03-02 18:24

reporter  

SkeletonPage.php (67 bytes)
PageIndex.php (106 bytes)
index.php (155 bytes)
xdebug-2.9.1-scenario-3.log (20,414 bytes)
xdebug-2.9.1-scenario-2.log (20,411 bytes)
xdebug-2.9.1-scenario-1.log (3,592 bytes)
xdebug-2.9.0-scenario-3.log (20,411 bytes)
xdebug-2.9.0-scenario-2.log (20,411 bytes)
xdebug-2.9.0-scenario-1.log (20,411 bytes)

derick

2020-03-04 16:49

administrator   ~0005265

Is opcache and/or opcache optimisation turned on?

SvetlanaZem

2020-03-05 12:30

reporter   ~0005267

No, I don't have opcache extension enabled

php-info.png (26,924 bytes)
php-info.png (26,924 bytes)

derick

2020-03-06 11:32

administrator   ~0005273

There was indeed a bug, although it had nothing to do with "empty lines". The problem was that during inheritence resolving the inherited methods (with their line numbers) where people collated with the methods in the child class, even though these were of course from a different file. The check makes sure that only methods of the same file are being considered for where code lives.

Issue History

Date Modified Username Field Change
2020-03-02 18:24 SvetlanaZem New Issue
2020-03-02 18:24 SvetlanaZem File Added: SkeletonPage.php
2020-03-02 18:24 SvetlanaZem File Added: PageIndex.php
2020-03-02 18:24 SvetlanaZem File Added: index.php
2020-03-02 18:24 SvetlanaZem File Added: xdebug-2.9.1-scenario-3.log
2020-03-02 18:24 SvetlanaZem File Added: xdebug-2.9.1-scenario-2.log
2020-03-02 18:24 SvetlanaZem File Added: xdebug-2.9.1-scenario-1.log
2020-03-02 18:24 SvetlanaZem File Added: xdebug-2.9.0-scenario-3.log
2020-03-02 18:24 SvetlanaZem File Added: xdebug-2.9.0-scenario-2.log
2020-03-02 18:24 SvetlanaZem File Added: xdebug-2.9.0-scenario-1.log
2020-03-04 16:49 derick Note Added: 0005265
2020-03-05 12:30 SvetlanaZem File Added: php-info.png
2020-03-05 12:30 SvetlanaZem Note Added: 0005267
2020-03-05 17:36 derick Target Version => 2.9.3
2020-03-05 17:36 derick Summary Xdebug behaviour depends on a number of empty lines in another file => Resolved breakpoints use information from wrong files
2020-03-05 17:36 derick Description Updated View Revisions
2020-03-05 17:36 derick Steps to Reproduce Updated View Revisions
2020-03-06 11:32 derick Assigned To => derick
2020-03-06 11:32 derick Status new => closed
2020-03-06 11:32 derick Resolution open => fixed
2020-03-06 11:32 derick Fixed in Version => 2.9.3
2020-03-06 11:32 derick Note Added: 0005273
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized