Class Dim
java.lang.Object
org.mozilla.javascript.tools.debugger.Dim
Dim or Debugger Implementation for Rhino.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class to store information about a stack.static class
Class to store information about a function.static class
Class to store information about a script source.static class
Object to represent one stack frame. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachTo
(ContextFactory factory) Attaches the debugger to the given ContextFactory.void
Clears all breakpoints.void
compileScript
(String url, String text) Compiles the given script.void
contextSwitch
(int frameIndex) Switches context to the stack frame with the given index.Returns the current ContextData object.void
detach()
Detaches the debugger from the current ContextFactory.void
dispose()
Releases resources associated with this debugger.Evaluates the given script.void
evalScript
(String url, String text) Evaluates the given script.String[]
Returns an array of all function names.functionSourceByName
(String functionName) Returns the FunctionSource object for the function with the given name.Object[]
getObjectIds
(Object object) Returns an array of the property names on the given script object.getObjectProperty
(Object object, Object id) Returns the value of a property on the given script object.void
go()
Resumes execution of script.objectToString
(Object object) Converts the given script object to a string.void
setBreak()
Tells the debugger to break at the next opportunity.void
setBreakOnEnter
(boolean breakOnEnter) Sets whether the debugger should break on function entering.void
setBreakOnExceptions
(boolean breakOnExceptions) Sets whether the debugger should break on exceptions.void
setBreakOnReturn
(boolean breakOnReturn) Sets whether the debugger should break on function return.void
setGuiCallback
(GuiCallback callback) Sets the GuiCallback object to use.void
setReturnValue
(int returnValue) Sets the action to perform to end interruption.void
setScopeProvider
(ScopeProvider scopeProvider) Sets the ScopeProvider to be used.void
setSourceProvider
(SourceProvider sourceProvider) Sets the ScopeProvider to be used.sourceInfo
(String url) Returns the SourceInfo object for the given URL.boolean
Returns whether the given string is syntactically valid script.
-
Field Details
-
STEP_OVER
public static final int STEP_OVER- See Also:
-
STEP_INTO
public static final int STEP_INTO- See Also:
-
STEP_OUT
public static final int STEP_OUT- See Also:
-
GO
public static final int GO- See Also:
-
BREAK
public static final int BREAK- See Also:
-
EXIT
public static final int EXIT- See Also:
-
-
Constructor Details
-
Dim
public Dim()
-
-
Method Details
-
setGuiCallback
Sets the GuiCallback object to use. -
setBreak
public void setBreak()Tells the debugger to break at the next opportunity. -
setScopeProvider
Sets the ScopeProvider to be used. -
setSourceProvider
Sets the ScopeProvider to be used. -
contextSwitch
public void contextSwitch(int frameIndex) Switches context to the stack frame with the given index. -
setBreakOnExceptions
public void setBreakOnExceptions(boolean breakOnExceptions) Sets whether the debugger should break on exceptions. -
setBreakOnEnter
public void setBreakOnEnter(boolean breakOnEnter) Sets whether the debugger should break on function entering. -
setBreakOnReturn
public void setBreakOnReturn(boolean breakOnReturn) Sets whether the debugger should break on function return. -
attachTo
Attaches the debugger to the given ContextFactory. -
detach
public void detach()Detaches the debugger from the current ContextFactory. -
dispose
public void dispose()Releases resources associated with this debugger. -
functionNames
Returns an array of all function names. -
functionSourceByName
Returns the FunctionSource object for the function with the given name. -
sourceInfo
Returns the SourceInfo object for the given URL. -
clearAllBreakpoints
public void clearAllBreakpoints()Clears all breakpoints. -
currentContextData
Returns the current ContextData object. -
setReturnValue
public void setReturnValue(int returnValue) Sets the action to perform to end interruption. -
go
public void go()Resumes execution of script. -
eval
Evaluates the given script. -
compileScript
Compiles the given script. -
evalScript
Evaluates the given script. -
objectToString
Converts the given script object to a string. -
stringIsCompilableUnit
Returns whether the given string is syntactically valid script. -
getObjectProperty
Returns the value of a property on the given script object. -
getObjectIds
Returns an array of the property names on the given script object.
-