Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 386997 - Need to support 'debugger' statement
: Need to support 'debugger' statement
Product: Rhino
Classification: Components
Component: Core (show other bugs)
: other
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
  Show dependency treegraph
Reported: 2007-07-05 10:17 PDT by Bob Jervis
Modified: 2007-07-12 08:16 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Partal patch for 'debugger' statement. (5.33 KB, patch)
2007-07-05 10:22 PDT, Bob Jervis
no flags Details | Diff | Splinter Review
Full patch implementing 'debugger' statement (6.78 KB, patch)
2007-07-10 17:09 PDT, Bob Jervis
no flags Details | Diff | Splinter Review

Description Bob Jervis 2007-07-05 10:17:56 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070309 Firefox/
Build Identifier: 

The 'debugger' statement is a useful debugging tool.  We should recognize it in user source and do something useful in a JavaScript debugger.

Reproducible: Always

Steps to Reproduce:
1. Take any working script and add 'debugger;' as a statement
Actual Results:  
Parse error

Expected Results:  
Normal execution (with 'debugger' behaving like a no-op).  A debugger should stop and report a breakpoint hit or some equivalent message.
Comment 1 Bob Jervis 2007-07-05 10:22:01 PDT
Created attachment 271087 [details] [diff] [review]
Partal patch for 'debugger' statement.

This is a partial patch.  It parses the 'debugger' statement and inserts a bytecode for it in the interpreted code path (and does nothing in the compiled path).  I have sent mail to Norris to get his opinion on how we should plumb this through to the DebugFrame interface.
Comment 2 Bob Jervis 2007-07-10 17:09:45 PDT
Created attachment 271769 [details] [diff] [review]
Full patch implementing 'debugger' statement

This revises the debugger support to include actual hitting of breakpoints within the debugger itself.
Comment 3 Norris Boyd 2007-07-12 08:16:39 PDT
Checked in proposed patch: 

Checking in src/org/mozilla/javascript/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/,v  <--
new revision: 1.107; previous revision: 1.106
Checking in src/org/mozilla/javascript/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/,v  <--
new revision: 1.328; previous revision: 1.327
Checking in src/org/mozilla/javascript/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/,v  <--
new revision: 1.117; previous revision: 1.116
Checking in src/org/mozilla/javascript/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/,v  <--
new revision: 1.41; previous revision: 1.40
Checking in src/org/mozilla/javascript/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/,v  <--
new revision: 1.68; previous revision: 1.67
Checking in src/org/mozilla/javascript/debug/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/debug/,v  <--
new revision: 1.10; previous revision: 1.9
Checking in src/org/mozilla/javascript/optimizer/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/optimizer/,v  <--
new revision: 1.249; previous revision: 1.248
Checking in toolsrc/org/mozilla/javascript/tools/debugger/;
/cvsroot/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/,v  <--
new revision: 1.13; previous revision: 1.12

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