Closed
Bug 710258
Opened 13 years ago
Closed 12 years ago
Don't allow the debugger to be open in more than one window
Categories
(DevTools :: Debugger, defect, P1)
DevTools
Debugger
Tracking
(firefox15 verified)
RESOLVED
FIXED
Firefox 16
Tracking | Status | |
---|---|---|
firefox15 | --- | verified |
People
(Reporter: past, Assigned: vporof)
References
Details
Attachments
(1 file, 1 obsolete file)
21.52 KB,
patch
|
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Debugging two tabs in parallel is a use case that we should support. The problem probably stems from the fact that the single debugger server has a single, non-namespaced, script cache for all its clients. Fixing bug 706506 might resolve this as well.
Reporter | ||
Updated•13 years ago
|
Priority: -- → P3
Reporter | ||
Updated•12 years ago
|
Priority: P3 → P1
Summary: When open in two tabs, the debugger UI shows the scripts of both tabs in each page → When open in two windows, the debugger UI shows the scripts of both pages
Reporter | ||
Comment 1•12 years ago
|
||
Different tabs can no longer have the debugger frontend open, but different windows can.
Reporter | ||
Comment 2•12 years ago
|
||
We should extend the approach in bug 753311 to cover different windows as well.
Updated•12 years ago
|
tracking-firefox15:
--- → ?
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•12 years ago
|
||
Heh, this is a bit tricky because every new chrome window will have its own instance of a DebuggerUI. Panos, would using a pref be ok?
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Victor Porof from comment #3) Although I hate this idea and I don't want to go this route.
Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Victor Porof from comment #4) > (In reply to Victor Porof from comment #3) > > Although I hate this idea and I don't want to go this route. Agreed, although I probably wouldn't object strongly to a pref. How about iterating over the windows and checking all DebuggerUI instances?
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Panos Astithas [:past] from comment #5) > (In reply to Victor Porof from comment #4) > > (In reply to Victor Porof from comment #3) > > > > Although I hate this idea and I don't want to go this route. > > Agreed, although I probably wouldn't object strongly to a pref. How about > iterating over the windows and checking all DebuggerUI instances? Still ugly, but worth a try. Should be ok, but I really don't fancy window mediator.
Comment 7•12 years ago
|
||
This bug is 6 months old - why should we track it for release?
Reporter | ||
Comment 8•12 years ago
|
||
(In reply to Alex Keybl [:akeybl] from comment #7) > This bug is 6 months old - why should we track it for release? I sort of re-purposed it in comment 1, since the original issue has been covered by bug 753311. It's a serious issue, in the sense that users who open multiple debuggers in different windows can be surprised by the behavior of the nested event loops (two paused debuggees must be resumed in reverse order). This bug will make sure that the user cannot open a second debugger when one is open in another window.
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Panos Astithas [:past] from comment #8) > (In reply to Alex Keybl [:akeybl] from comment #7) Since it's re-purposed, maybe we should rename this bug to "Don't allow the debugger to be open in more than one window"?
Reporter | ||
Updated•12 years ago
|
Summary: When open in two windows, the debugger UI shows the scripts of both pages → Don't allow the debugger to be open in more than one window
Comment 10•12 years ago
|
||
FWIW, I don't like this fix at all. This is a bad limitation implied by our implementation.
Reporter | ||
Comment 11•12 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #10) > FWIW, I don't like this fix at all. This is a bad limitation implied by our > implementation. Well, yes and no. Yes, it's more limiting than what Firebug does, for example, but it's a limitation imposed to protect the inexperienced developer from the subtleties of nested event loops. I think the prevailing opinion in the team right now is to allow multiple open debuggers at some point, but disallow resumption in a bad order, like Firebug. It's just that this would be more work than we can currently handle, and we don't want to ship the debugger with this bug present.
Comment 13•12 years ago
|
||
(In reply to Panos Astithas [:past] from comment #8) > (In reply to Alex Keybl [:akeybl] from comment #7) > > This bug is 6 months old - why should we track it for release? > > I sort of re-purposed it in comment 1, since the original issue has been > covered by bug 753311. It's a serious issue, in the sense that users who > open multiple debuggers in different windows can be surprised by the > behavior of the nested event loops (two paused debuggees must be resumed in > reverse order). This bug will make sure that the user cannot open a second > debugger when one is open in another window. OK - we'll track for release since the debugger is new to FF15. In the future, however, known issues critical enough to track for release should be resolved while that version of FF is on m-c.
Assignee | ||
Comment 14•12 years ago
|
||
(In reply to Victor Porof from comment #12) > Created attachment 634487 [details] [diff] [review] > v1 > > Fun. Try looks green: https://tbpl.mozilla.org/?tree=Try&rev=68ad6ee2de5d
Reporter | ||
Comment 16•12 years ago
|
||
Comment on attachment 634487 [details] [diff] [review] v1 Review of attachment 634487 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/devtools/debugger/DebuggerUI.jsm @@ +53,4 @@ > * @return DebuggerPane if the debugger is started, null if it's stopped. > */ > toggleDebugger: function DUI_toggleDebugger() { > + let scriptDebugger = this.getDebuggerIn("navigator:browser"); Why did you choose to encumber callers with specifying the window type instead of using navigator:browser inside getDebuggerIn? I can't see any call sites with a different value. @@ +102,5 @@ > + * The windows to check for a script debugger. > + * @return DebuggerPane | null > + * The script debugger instance if it exists, null otherwise. > + */ > + getDebuggerIn: function DUI_getDebuggerIn(aWindowType) { I think findDebugger might be a better name here, the dangling In sounds funny. ::: browser/devtools/debugger/test/browser_dbg_debugger-tab-switch-window.js @@ +8,5 @@ > +let gInitialWindow, gSecondWindow; > +let gPane1, gPane2; > +let gNbox; > + > +function test() { Nit: a short comment to describe the purpose of this test, please.
Attachment #634487 -
Flags: review?(past) → review+
Assignee | ||
Comment 17•12 years ago
|
||
Addressed comments.
Assignee | ||
Updated•12 years ago
|
Whiteboard: [land-in-fx-team]
Reporter | ||
Comment 18•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/6cbfdf764d22
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Updated•12 years ago
|
tracking-firefox15:
--- → +
Reporter | ||
Comment 19•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6cbfdf764d22
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 16
Reporter | ||
Updated•12 years ago
|
Attachment #634487 -
Attachment is obsolete: true
Reporter | ||
Comment 20•12 years ago
|
||
Comment on attachment 634858 [details] [diff] [review] v2 [Approval Request Comment] Bug caused by (feature/regressing bug #): New feature User impact if declined: developers will be able to open debuggers in separate browser windows, which can lead to confusing behavior regarding resumption from pauses. See also comment 8. Testing completed (on m-c, etc.): On m-c and fx-team Risk to taking this patch (and alternatives if risky): it's a small patch (besides tests) with a straight-forward refactoring, in a developer-only feature String or UUID changes made by this patch: none
Attachment #634858 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Attachment #634858 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Reporter | ||
Comment 21•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/43a9a6e3e68f
status-firefox15:
--- → fixed
tracking-firefox15:
+ → ---
Comment 22•12 years ago
|
||
Verified as fixed on: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0 Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0
Updated•12 years ago
|
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•