Note: There are a few cases of duplicates in user autocompletion which are being worked on.

JS Debugger errors prevent me from debugging Orion

RESOLVED FIXED in Firefox 15



Developer Tools: Debugger
5 years ago
5 years ago


(Reporter: msucan, Assigned: past)


Firefox 16

Firefox Tracking Flags

(firefox15 verified)



(1 attachment, 2 obsolete attachments)



5 years ago

1. Load
2. Open the debugger.
3. Reload the page.
4. Select textModel.js from the list of script.
5. Ctrl-F to find "setText:".
6. Set a breakpoint within the first lines of the setText() method.
7. In the Orion demo page select "JavaScript" to load the JS demo.

At this point the debugger should pause execution at the breakpoint you've set. Nothing happens.

Open the Error Console and you will see several errors:

Error: TypeError: is not iterable
Source File: resource://gre/modules/devtools/dbg-client.jsm
Line: 152

I tried pause and resume:

Error: Got an exception during TA__pauseAndRespond: Error: Debugger scope is not live: 
Source File: chrome://global/content/devtools/dbg-script-actors.js
Line: 174

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIJSInspector.exitNestedEventLoop]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/devtools/dbg-script-actors.js :: TA_onResume :: line 267"  data: no]
Source File: chrome://global/content/devtools/dbg-server.js
Line: 437

Then I closed the debugger:

Error: TypeError: this._scripts is null
Source File: resource://gre/modules/devtools/dbg-client.jsm
Line: 420

While playing with the debugger in some other tries I also saw:

Error: Debugger.Frame is not live
Source File: chrome://global/content/devtools/dbg-script-actors.js
Line: 1276

Debugging Orion used to work for me.
I have a fix for the " is not iterable" error, but I'm still looking at the rest.
Assignee: nobody → past
OS: Linux → All
Priority: -- → P2
Hardware: x86_64 → All
Created attachment 630105 [details] [diff] [review]

This patch fixes the error, but I don't quite understand why env.getVariable throws in the |arguments| case. This is the same error that js/src/jit-test/tests/debug/Frame-eval-12.js tests for, but I need to wrap my head around it.
Created attachment 630126 [details] [diff] [review]
Patch v2

I reverted for...of to for each, since a for...of loop cannot be used for iterating over properties:

The "scope is not live" error stems from a change in bug 746601. Jim is the  check for enough, or should I use a try/catch? Should I restrict such checks to name == 'arguments', too?
Attachment #630105 - Attachment is obsolete: true
Attachment #630126 - Flags: review?(rcampbell)
Attachment #630126 - Flags: review?(jimb)
Blocks: 754251
Priority: P2 → P1
Comment on attachment 630126 [details] [diff] [review]
Patch v2

Rob is on PTO and this is kinda urgent.
Attachment #630126 - Flags: review?(rcampbell) → review?(dcamp)


5 years ago
Attachment #630126 - Flags: review?(dcamp) → review+
I've landed this as it's really important:

Jim, if you have any additional comments, I'll address them in the patch for bug 754251.
Whiteboard: [fixed-in-fx-team]
Backed out due to test failures:
Whiteboard: [fixed-in-fx-team]
Created attachment 631304 [details] [diff] [review]
Patch v3

Had I remembered to run the tests with this patch applied, I would have seen that the check was too broad. I've tightened it up as I was pondering in comment 3. I need a vacation.
Attachment #630126 - Attachment is obsolete: true
Attachment #630126 - Flags: review?(jimb)
Whiteboard: [fixed-in-fx-team]
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 16
we want to land this in Aurora, right?
tracking-firefox15: --- → ?
Comment on attachment 631304 [details] [diff] [review]
Patch v3

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Fix for new feature.
User impact if declined: New feature will not work perfectly.
Testing completed (on m-c, etc.): On m-c.
Risk to taking this patch (and alternatives if risky): Actually decreases user risk through better error capture and handling.
String or UUID changes made by this patch: none.
Attachment #631304 - Flags: approval-mozilla-aurora?


5 years ago
Attachment #631304 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
status-firefox15: --- → fixed
tracking-firefox15: ? → ---

Comment 13

5 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
status-firefox15: fixed → verified
You need to log in before you can comment on or make changes to this bug.