The default bug view has changed. See this FAQ.

JS Debugger errors prevent me from debugging Orion

RESOLVED FIXED in Firefox 15

Status

()

Firefox
Developer Tools: Debugger
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: msucan, Assigned: past)

Tracking

Trunk
Firefox 16
Points:
---

Firefox Tracking Flags

(firefox15 verified)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

5 years ago
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
Created attachment 630105 [details] [diff] [review]
Patch

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:
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)
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)

Updated

5 years ago
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]
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 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)
Relanded:
https://hg.mozilla.org/integration/fx-team/rev/b4163cf4139e
Whiteboard: [fixed-in-fx-team]
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
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?

Updated

5 years ago
Attachment #631304 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/bcbb733c3b73
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.