Last Comment Bug 761223 - JS Debugger errors prevent me from debugging Orion
: JS Debugger errors prevent me from debugging Orion
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: Trunk
: All All
P1 normal (vote)
: Firefox 16
Assigned To: Panos Astithas [:past]
: Jason Laster [:jlast]
Depends on:
Blocks: 754251
  Show dependency treegraph
Reported: 2012-06-04 10:17 PDT by Mihai Sucan [:msucan]
Modified: 2012-08-03 07:24 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (3.07 KB, patch)
2012-06-05 01:59 PDT, Panos Astithas [:past]
no flags Details | Diff | Splinter Review
Patch v2 (3.79 KB, patch)
2012-06-05 04:04 PDT, Panos Astithas [:past]
dcamp: review+
Details | Diff | Splinter Review
Patch v3 (3.87 KB, patch)
2012-06-08 01:48 PDT, Panos Astithas [:past]
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description User image Mihai Sucan [:msucan] 2012-06-04 10:17:52 PDT

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.
Comment 1 User image Panos Astithas [:past] 2012-06-04 10:28:53 PDT
I have a fix for the " is not iterable" error, but I'm still looking at the rest.
Comment 2 User image Panos Astithas [:past] 2012-06-05 01:59:14 PDT
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.
Comment 3 User image Panos Astithas [:past] 2012-06-05 04:04:13 PDT
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?
Comment 4 User image Panos Astithas [:past] 2012-06-07 09:42:35 PDT
Comment on attachment 630126 [details] [diff] [review]
Patch v2

Rob is on PTO and this is kinda urgent.
Comment 5 User image Panos Astithas [:past] 2012-06-08 00:07:02 PDT
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.
Comment 6 User image Panos Astithas [:past] 2012-06-08 01:21:30 PDT
Backed out due to test failures:
Comment 7 User image Panos Astithas [:past] 2012-06-08 01:48:46 PDT
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.
Comment 8 User image Panos Astithas [:past] 2012-06-08 01:50:35 PDT
Comment 10 User image Rob Campbell [:rc] (:robcee) 2012-06-11 10:42:36 PDT
we want to land this in Aurora, right?
Comment 11 User image Rob Campbell [:rc] (:robcee) 2012-06-11 10:44:42 PDT
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.
Comment 13 User image Ioana (away) 2012-08-03 07:24:06 PDT
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

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