Closed Bug 1148356 Opened 10 years ago Closed 6 years ago

When sliding a line breakpoint on a non-sourcemapped source, only consider the innermost script.

Categories

(DevTools :: Debugger, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ejpbruel, Unassigned)

References

(Blocks 1 open bug)

Details

Currently, when sliding a line breakpoint on a non-sourcemapped source, we consider all scripts that match the given source and line. When setting a breakpoint on an empty line at the end of a function, this causes us to slide to the next closest line with at least one offset, even if that line is not within the same function. We can do better here by only considering the innermost script when sliding a line breakpoint in a non-source mapped source. There are currently two known issues that prevent us from only considering the innermost script. First, the number of lines in a script currently does not include empty lines at the end, so we will never get the innermost script when setting a breakpoint on one of those lines. Second, when a new script is introduced, parent scripts are introduced before child scripts, so if the script for the function was gc'd, when the breakpoint was set, on reload we will try to set the breakpoint again when the parent script is reintroduced. Since the function script has not yet been reintroduced, the parent script is incorrectly identified the innermost script, and we still end up sliding to a line that's not within the same function body. Once the above issues are fixed, we should readdress this problem.
Blocks: source-maps
Product: Firefox → DevTools

closing as we no longer support sliding.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.