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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.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) toString()
Formats the current call stack into a human readable string.
-
Constructor Details
-
JavaScriptDebugger
public JavaScriptDebugger()
-
-
Method Details
-
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
-
toString
Formats the current call stack into a human readable string.
-