Closed Bug 1417240 Opened 7 years ago Closed 5 years ago

Breakpoint is hit again after a step, line seems to be executed twice

Categories

(DevTools :: Debugger, defect)

56 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1441183

People

(Reporter: account-mozilla-bugzilla, Unassigned)

Details

Attachments

(2 files)

Attached file example.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170612122018

Steps to reproduce:

1. Open attached example.html
2. Go to Developer -> Debugger
3. Set breakpoint in line 6 (first statement) and line 8 (second statement)
4. Reload to hit first breakpoint
5. Step Over (debugger now paused at line 8, correct)
6. Resume


Actual results:

- After step 6: Debugger paused again at line 8. (First paused there because of Step Over from previous line.)

- Gives the impression that line 8 is executed twice. The console output of the second statement is only visible after the resume, so where does the step over after line 6 actually pause?


Expected results:

- After step 5: Console output should show "second statement" (i.e. the statement in line 8 should have executed.)
- The resume after that should finish execution of the program, not pause again in line 8.
Component: Untriaged → Developer Tools: Debugger
Summary: Breakpoint is hit after a step, line seems to be executed twice → Breakpoint is hit again after a step, line seems to be executed twice
Thanks Daniel for reporting, we're tracking something similar here

https://github.com/devtools-html/debugger.html/issues/4013
Product: Firefox → DevTools

Hey Daniel, does this still happen for you?

Flags: needinfo?(account-mozilla-bugzilla)

Hi Jason, sorry for the late reply.

This does in fact still reproduce in the current nightly 68.0a1 (2019-05-13) (64-Bit). I.e., when I pause at the first breakpoint, then step over, the debugger pauses in line 8. Clicking on resume pauses in line 8 again, which I think is surprising. I am not sure what causes this though, let alone how to fix it. Note that if one resumes from the first breakpoint instead of step over, the debugger pauses only once in line 8, which seems correct. That is, is there a difference between the pause at line 8 because of a step over vs. a pause at line 8 because of a breakpoint there?

Flags: needinfo?(account-mozilla-bugzilla)

Yes! We are fixing something similar over here bug 1441183 and will include this STR.

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

Attachment

General

Creator:
Created:
Updated:
Size: