-
-
Notifications
You must be signed in to change notification settings - Fork 35.1k
Open
Labels
inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocol
Description
- Version: 14.13.1
(also checked all major versions, 13, 12, 11, 10 – issue persists) - Platform: MacOS
- Subsystem: Debugger
What steps will reproduce the bug?
- Execute this script with any debugger (Chrome DevTools, VSCode, WebStorm).
- Place line breakpoints on lines with comments.
- Debugger stopped at the first breakpoint. (
second(first());line)
Functionfirst()have already been executed. – see console output - Resume execution
- Debugger stopped at the second breakpoint (
second(first(1));line)
The functionfirst()has not yet been executed. - Resume execution
- Function
first()executed -> see console.
function first(x) {
console.log("first() executed");
}
function second(x) {
console.log("");
}
debugger;
second(first()); // place line breakpoint here
second(first(1)); // place line breakpoint here
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
It is expected that no statements have been executed before the debugger stopped at the line breakpoint.
Also, the behavior must be consistent. As we see it differs for second(first()); and second(first(1));
What do you see instead?
Function first has been executed before the stop at the breakpoint.
Additional information
WebStorm debugger in both cases debugger sets breakpoint with Debugger.setBreakpointByUrl method with specified lineNumber and with not specified columnNumber (which by default must work for the whole line)
Both breakpoints later resolved to the 0 column. But the order of execution may be different. So it is not possible for a debugger to set a line breakpoint which stops before any statement being executed.
The same script works perfectly in Chrome.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocol
