View Issue Details

IDProjectCategoryView StatusLast Update
0001753XdebugUncategorizedpublic2020-03-06 11:32
ReporterSvetlanaZem Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.9.1 
Target Version2.9.3Fixed in Version2.9.3 
Summary0001753: Resolved breakpoints use information from wrong files
Description

Xdebug 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 Reproduce

Download 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 Information

Xdebug 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

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

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.