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.
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....
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?
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.
I believe this is another instance of bug #1013219. The fix for that bug fixes this one as well.
(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.