Closed Bug 761223 Opened 12 years ago Closed 12 years ago

JS Debugger errors prevent me from debugging Orion

Categories

(DevTools :: Debugger, defect, P1)

defect

Tracking

(firefox15 verified)

RESOLVED FIXED
Firefox 16
Tracking Status
firefox15 --- verified

People

(Reporter: msucan, Assigned: past)

References

Details

Attachments

(1 file, 2 obsolete files)

STR:

1. Load http://orion.eclipse.org/examples/textview/demo.html
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: DebuggerController.Breakpoints.store 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 "DebuggerController.Breakpoints.store is not iterable" error, but I'm still looking at the rest.
Assignee: nobody → past
Status: NEW → ASSIGNED
OS: Linux → All
Priority: -- → P2
Hardware: x86_64 → All
Attached patch Patch (obsolete) — Splinter 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.
Attached patch Patch v2 (obsolete) — Splinter Review
I reverted for...of to for each, since a for...of loop cannot be used for iterating over properties:
http://mxr.mozilla.org/mozilla-central/source/js/src/jsiter.cpp#420

The "scope is not live" error stems from a change in bug 746601. Jim is the  check for env.callee.live 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)
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)
Attachment #630126 - Flags: review?(dcamp) → review+
I've landed this as it's really important:
https://hg.mozilla.org/integration/fx-team/rev/61e0d5d09f77

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:
https://hg.mozilla.org/integration/fx-team/rev/198c0a1d3b51
Whiteboard: [fixed-in-fx-team]
Attached patch Patch v3Splinter Review
Had I remembered to run the tests with this patch applied, I would have seen that the env.callee.live 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)
https://hg.mozilla.org/mozilla-central/rev/61e0d5d09f77
https://hg.mozilla.org/mozilla-central/rev/198c0a1d3b51
https://hg.mozilla.org/mozilla-central/rev/b4163cf4139e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 16
we want to land this in Aurora, right?
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?
Attachment #631304 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
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
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: