Closed
Bug 1093738
Opened 10 years ago
Closed 9 years ago
Breakpoints hit in code not executed
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1013219
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
528 bytes,
application/zip
|
Details |
A breakpoint set in an 'else' clause can be hit even when the 'else' is not taken. - Unpack the attached ZIP file, containing bp.html and bp.js. - Visit bp.html. - Open the debugger. - Set a breakpoint in bp.js on the line indicated by the comment. - Click on the text that says 'click me'. - The text "PASS bleah" is logged to the console, indicating that the 'then' branch was taken. - The debugger reports a breakpoint hit in the 'else' branch. - Press continue. Note that "FAIL bleah" is never logged to the console, ruling out the possibility of multiple calls to the function.
Reporter | ||
Comment 1•10 years ago
|
||
Updated•10 years ago
|
Blocks: dbg-breakpoint
Comment 2•10 years ago
|
||
(In reply to Jim Blandy :jimb from comment #0) > A breakpoint set in an 'else' clause can be hit even when the 'else' is not > taken. > > - Unpack the attached ZIP file, containing bp.html and bp.js. > - Visit bp.html. > - Open the debugger. > - Set a breakpoint in bp.js on the line indicated by the comment. > - Click on the text that says 'click me'. > - The text "PASS bleah" is logged to the console, indicating that the 'then' > branch was taken. > - The debugger reports a breakpoint hit in the 'else' branch. > - Press continue. > > Note that "FAIL bleah" is never logged to the console, ruling out the > possibility of multiple calls to the function. Do you think this could be related to how we map breakpoint locations to bytecode offsets using source notes?
Comment 3•10 years ago
|
||
It sure looks like either a bug with source notes or perhaps with the gigantic, in-need-of-refactoring, offset-choosing ThreadActor.prototype._setBreakpoint function.
Comment 4•9 years ago
|
||
This is another instance of bug 1013219. The patch for that (plus the patch for bug 1003554) fixes this. I think the bug here is that the "goto" at the end of the "then" branch lands on the compiler-generated retrval -- which is erroneously given the line number of the previous console.log, and thus appears to be an entry point for purposes of breakpoint setting.
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•