Package org.jvnet.hudson.test.rhino
Class JavaScriptDebugger
- java.lang.Object
-
- org.jvnet.hudson.test.rhino.JavaScriptDebugger
-
- All Implemented Interfaces:
org.htmlunit.corejs.javascript.debug.Debugger
public class JavaScriptDebugger extends Object implements org.htmlunit.corejs.javascript.debug.Debugger
Monitors the execution of the JavaScript inside HtmlUnit, and provides debug information such as call stacks, variables, arguments, etc.Usage
When you set a break point in Java code that are directly/indirectly invoked through JavaScript, use
toString()
to see the JavaScript stack trace (and variables at each stack frame.) This helps you see where the problem is.TODO: add programmatic break point API, selective method invocation tracing, and allow arbitrary script evaluation in arbitrary stack frame.
- Author:
- Kohsuke Kawaguchi
- See Also:
HudsonTestCase.jsDebugger
-
-
Constructor Summary
Constructors Constructor Description JavaScriptDebugger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.htmlunit.corejs.javascript.debug.DebugFrame
getFrame(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.debug.DebuggableScript fnOrScript)
void
handleCompilationDone(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.debug.DebuggableScript fnOrScript, String source)
String
toString()
Formats the current call stack into a human readable string.
-
-
-
Method Detail
-
handleCompilationDone
public void handleCompilationDone(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.debug.DebuggableScript fnOrScript, String source)
- Specified by:
handleCompilationDone
in interfaceorg.htmlunit.corejs.javascript.debug.Debugger
-
getFrame
public org.htmlunit.corejs.javascript.debug.DebugFrame getFrame(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.debug.DebuggableScript fnOrScript)
- Specified by:
getFrame
in interfaceorg.htmlunit.corejs.javascript.debug.Debugger
-
-