Debugger should not interrupt the client twice at the same location

RESOLVED FIXED in Firefox 25

Status

()

Firefox
Developer Tools: Debugger
P3
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Honza, Assigned: past)

Tracking

unspecified
Firefox 25
x86
Windows Vista
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [firebug-p2])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Imagine following scenario:

 1. var a = 10;
*2. var b = 20;    // this line has a breakpoint
 3. var c = 30;

1) The script execution starts at line #1
2) The user steps-over and the next interrupt happens at line #2
3) The user steps-over and the next interrupt happens at line #2 again because of the breakpoint.

The debugger (server side) should be smart enough to recognize that the second interrupt (at the line #2) is not necessary (it's the same debugging location as where the debugger already is).

Honza
(Reporter)

Updated

5 years ago
Whiteboard: [firebug-p2]
I think BA_hit should just continue instead of pausing, if onStep or onEnetrFrame hooks are set on the frame/debugger. Maybe only onStep, since stepping over a function could trigger breakpoints inside that function and perhaps pausing there would be expected?
Priority: -- → P3
Created attachment 775352 [details] [diff] [review]
Don't pause twice on a breakpoint or debugger statement while stepping

This works but needs a test.
Assignee: nobody → past
Status: NEW → ASSIGNED
Created attachment 776374 [details] [diff] [review]
Don't pause twice on a breakpoint or debugger statement while stepping v2

Added tests for both cases described in comment 1.
Attachment #776374 - Flags: review?(rcampbell)
Attachment #775352 - Attachment is obsolete: true
Comment on attachment 776374 [details] [diff] [review]
Don't pause twice on a breakpoint or debugger statement while stepping v2

Review of attachment 776374 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/devtools/server/tests/unit/test_breakpoint-13.js
@@ +91,5 @@
> +      });
> +      // Step into the next line with the function call.
> +      gThreadClient.stepIn();
> +    });
> +  });

pretty.
Attachment #776374 - Flags: review?(rcampbell) → review+
https://hg.mozilla.org/integration/fx-team/rev/5be325efcdcf
Whiteboard: [firebug-p2] → [firebug-p2][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/5be325efcdcf
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [firebug-p2][fixed-in-fx-team] → [firebug-p2]
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.