Closed
Bug 1052738
Opened 11 years ago
Closed 10 years ago
Breakpoint on the last line in an if block fires twice
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1013219
People
(Reporter: ejpbruel, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
144 bytes,
text/html
|
Details |
Steps to reproduce:
- In Nightly, open bug.html in the attachment
- Set a breakpoint on the following lines:
- var a = 2;
- var b = 3;
- var c = 5
- Call the function f() in the console
Observed behavior:
- The breakpoint on the first two lines hits once, but the breakpoint on the last line hits twice (note how you have to resume twice).
- This only happens if you wrap the statements in an if-block, as I did here. If you remove the if-block the problem disappears.
Expected behavior:
- The breakpoint on the last line should hit only once as well.
Since the problem only occurs within an if-block, I suspect this has something to do with how we map source locations to breakpoint offsets.
Reporter | ||
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
I think this is similar:
When you go inside any loop, the execution first goes to the second last line of the loop block and then enter the loop....
Reporter | ||
Comment 3•11 years ago
|
||
I'm a bit surprised we still have so many issues with breakpoint offsets tbh. I thought we had pretty decent test coverage for that?
Updated•10 years ago
|
Attachment #8471810 -
Attachment is patch: false
Attachment #8471810 -
Attachment mime type: text/plain → text/html
Comment 5•10 years ago
|
||
The first pause in the "var c..." line happens in column 8, while the second one in column 9. I think we should inspect the source notes to get more data.
Reporter | ||
Updated•10 years ago
|
Blocks: dbg-breakpoint
Comment 6•10 years ago
|
||
I believe this is another instance of bug #1013219.
The fix for that bug fixes this one as well.
Comment 7•10 years ago
|
||
(In reply to Tom Tromey :tromey from comment #6)
> I believe this is another instance of bug #1013219.
> The fix for that bug fixes this one as well.
I'm not sure why I didn't mark it as a dup then; doing so now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•