Class Main
java.lang.Object
org.mozilla.javascript.tools.debugger.Main
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattachTo(ContextFactory factory) Attaches the debugger to the givenContextFactory.voidRemoves all breakpoints.voidDeprecated.The method is only present for compatibility and should not be called.voidDeprecated.The method is only present for compatibility and should not be called.voidcontextExited(Context cx) Deprecated.The method is only present for compatibility and should not be called.voidDeprecated.The method is only present for compatibility and should not be called.voiddetach()Detaches from the currentContextFactory.voiddispose()Frees any resources held by the debugger.voiddoBreak()Breaks execution of the script.Returns the debugger windowJFrame.getErr()Returns aPrintStreamfor stderr in the Debugger's internal Console window.getIn()Returns anInputStreamfor stdin from the debugger's internal Console window.getOut()Returns aPrintStreamfor stdout to the debugger's internal Console window.voidgo()Resumes execution of the script.booleanReturns whether the debugger GUI frame is visible.static voidMain entry point.static MainmainEmbedded(String title) Entry point for embedded applications.static MainmainEmbedded(ContextFactory factory, Scriptable scope, String title) Entry point for embedded applications.static MainmainEmbedded(ContextFactory factory, ScopeProvider scopeProvider, String title) Entry point for embedded applications.voidpack()Packs the debugger GUI frame.voidsetBreakOnEnter(boolean value) Sets whether execution should break when a function is entered.voidsetBreakOnExceptions(boolean value) Sets whether execution should break when a script exception is thrown.voidsetBreakOnReturn(boolean value) Sets whether execution should break when a function is left.voidAssign a Runnable object that will be invoked when the user selects "Exit..." or closes the Debugger main window.voidsetOptimizationLevel(int level) Deprecated.The method does nothing and is only present for compatibility.voidsetScope(Scriptable scope) Sets the scope to be used for script evaluation.voidSets theScopeProviderthat provides a scope to be used for script evaluation.voidsetSize(int w, int h) Sets the debugger GUI frame dimensions.voidDeprecated.UsesetSize(int, int)instead.voidsetSourceProvider(SourceProvider sourceProvider) Sets theSourceProviderthat provides the source to be displayed for script evaluation.voidsetVisible(boolean flag) Sets the visibility of the debugger GUI frame.
-
Constructor Details
-
Main
Creates a new Main.
-
-
Method Details
-
getDebugFrame
Returns the debugger windowJFrame. -
doBreak
public void doBreak()Breaks execution of the script. -
setBreakOnExceptions
public void setBreakOnExceptions(boolean value) Sets whether execution should break when a script exception is thrown. -
setBreakOnEnter
public void setBreakOnEnter(boolean value) Sets whether execution should break when a function is entered. -
setBreakOnReturn
public void setBreakOnReturn(boolean value) Sets whether execution should break when a function is left. -
clearAllBreakpoints
public void clearAllBreakpoints()Removes all breakpoints. -
go
public void go()Resumes execution of the script. -
setScope
Sets the scope to be used for script evaluation. -
setScopeProvider
Sets theScopeProviderthat provides a scope to be used for script evaluation. -
setSourceProvider
Sets theSourceProviderthat provides the source to be displayed for script evaluation. -
setExitAction
Assign a Runnable object that will be invoked when the user selects "Exit..." or closes the Debugger main window. -
getIn
Returns anInputStreamfor stdin from the debugger's internal Console window. -
getOut
Returns aPrintStreamfor stdout to the debugger's internal Console window. -
getErr
Returns aPrintStreamfor stderr in the Debugger's internal Console window. -
pack
public void pack()Packs the debugger GUI frame. -
setSize
public void setSize(int w, int h) Sets the debugger GUI frame dimensions. -
setVisible
public void setVisible(boolean flag) Sets the visibility of the debugger GUI frame. -
isVisible
public boolean isVisible()Returns whether the debugger GUI frame is visible. -
dispose
public void dispose()Frees any resources held by the debugger. -
attachTo
Attaches the debugger to the givenContextFactory. -
detach
public void detach()Detaches from the currentContextFactory. -
main
Main entry point. Creates a debugger attached to a RhinoMainshell session. -
mainEmbedded
Entry point for embedded applications. This method attaches to the globalContextFactorywith a scope of a newly createdGlobalobject. No I/O redirection is performed as withmain(String[]). -
mainEmbedded
Entry point for embedded applications. This method attaches to the givenContextFactorywith the given scope. No I/O redirection is performed as withmain(String[]). -
mainEmbedded
Entry point for embedded applications. This method attaches to the givenContextFactorywith the given scope. No I/O redirection is performed as withmain(String[]). -
setSize
Deprecated.UsesetSize(int, int)instead. -
setOptimizationLevel
Deprecated.The method does nothing and is only present for compatibility. -
contextEntered
Deprecated.The method is only present for compatibility and should not be called. -
contextExited
Deprecated.The method is only present for compatibility and should not be called. -
contextCreated
Deprecated.The method is only present for compatibility and should not be called. -
contextReleased
Deprecated.The method is only present for compatibility and should not be called.
-