Closed Bug 829028 Opened 11 years ago Closed 11 years ago

Debugger should not interrupt the client twice at the same location

Categories

(DevTools :: Debugger, defect, P3)

x86
Windows Vista
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: Honza, Assigned: past)

Details

(Whiteboard: [firebug-p2])

Attachments

(1 file, 1 obsolete file)

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
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
Assignee: nobody → past
Status: NEW → ASSIGNED
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
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [firebug-p2][fixed-in-fx-team] → [firebug-p2]
Target Milestone: --- → Firefox 25
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: