Last Comment Bug 829028 - Debugger should not interrupt the client twice at the same location
: Debugger should not interrupt the client twice at the same location
Status: RESOLVED FIXED
[firebug-p2]
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: unspecified
: x86 Windows Vista
: P3 normal (vote)
: Firefox 25
Assigned To: Panos Astithas [:past]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-10 07:28 PST by Jan Honza Odvarko [:Honza] PTO 07/23 - 08/08
Modified: 2013-07-20 00:38 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Don't pause twice on a breakpoint or debugger statement while stepping (1.44 KB, patch)
2013-07-14 10:08 PDT, Panos Astithas [:past]
no flags Details | Diff | Splinter Review
Don't pause twice on a breakpoint or debugger statement while stepping v2 (11.32 KB, patch)
2013-07-16 06:45 PDT, Panos Astithas [:past]
rcampbell: review+
Details | Diff | Splinter Review

Description Jan Honza Odvarko [:Honza] PTO 07/23 - 08/08 2013-01-10 07:28:18 PST
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
Comment 1 Panos Astithas [:past] 2013-01-14 01:00:25 PST
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?
Comment 2 Panos Astithas [:past] 2013-07-14 10:08:47 PDT
Created attachment 775352 [details] [diff] [review]
Don't pause twice on a breakpoint or debugger statement while stepping

This works but needs a test.
Comment 3 Panos Astithas [:past] 2013-07-16 06:45:01 PDT
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.
Comment 4 Rob Campbell [:rc] (:robcee) 2013-07-17 16:30:08 PDT
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.
Comment 5 Panos Astithas [:past] 2013-07-18 04:18:26 PDT
https://hg.mozilla.org/integration/fx-team/rev/5be325efcdcf
Comment 6 Tim Taubert [:ttaubert] 2013-07-20 00:38:04 PDT
https://hg.mozilla.org/mozilla-central/rev/5be325efcdcf

Note You need to log in before you can comment on or make changes to this bug.