Class Main
java.lang.Object
org.mozilla.javascript.tools.debugger.Main
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachTo
(ContextFactory factory) Attaches the debugger to the givenContextFactory
.void
Removes all breakpoints.void
Deprecated.The method is only present for compatibility and should not be called.void
Deprecated.The method is only present for compatibility and should not be called.void
contextExited
(Context cx) Deprecated.The method is only present for compatibility and should not be called.void
Deprecated.The method is only present for compatibility and should not be called.void
detach()
Detaches from the currentContextFactory
.void
dispose()
Frees any resources held by the debugger.void
doBreak()
Breaks execution of the script.Returns the debugger windowJFrame
.getErr()
Returns aPrintStream
for stderr in the Debugger's internal Console window.getIn()
Returns anInputStream
for stdin from the debugger's internal Console window.getOut()
Returns aPrintStream
for stdout to the debugger's internal Console window.void
go()
Resumes execution of the script.boolean
Returns whether the debugger GUI frame is visible.static void
Main entry point.static Main
mainEmbedded
(String title) Entry point for embedded applications.static Main
mainEmbedded
(ContextFactory factory, Scriptable scope, String title) Entry point for embedded applications.static Main
mainEmbedded
(ContextFactory factory, ScopeProvider scopeProvider, String title) Entry point for embedded applications.void
pack()
Packs the debugger GUI frame.void
setBreakOnEnter
(boolean value) Sets whether execution should break when a function is entered.void
setBreakOnExceptions
(boolean value) Sets whether execution should break when a script exception is thrown.void
setBreakOnReturn
(boolean value) Sets whether execution should break when a function is left.void
Assign a Runnable object that will be invoked when the user selects "Exit..." or closes the Debugger main window.void
setOptimizationLevel
(int level) Deprecated.The method does nothing and is only present for compatibility.void
setScope
(Scriptable scope) Sets the scope to be used for script evaluation.void
Sets theScopeProvider
that provides a scope to be used for script evaluation.void
setSize
(int w, int h) Sets the debugger GUI frame dimensions.void
Deprecated.UsesetSize(int, int)
instead.void
setSourceProvider
(SourceProvider sourceProvider) Sets theSourceProvider
that provides the source to be displayed for script evaluation.void
setVisible
(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 theScopeProvider
that provides a scope to be used for script evaluation. -
setSourceProvider
Sets theSourceProvider
that 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 anInputStream
for stdin from the debugger's internal Console window. -
getOut
Returns aPrintStream
for stdout to the debugger's internal Console window. -
getErr
Returns aPrintStream
for 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 RhinoMain
shell session. -
mainEmbedded
Entry point for embedded applications. This method attaches to the globalContextFactory
with a scope of a newly createdGlobal
object. No I/O redirection is performed as withmain(String[])
. -
mainEmbedded
Entry point for embedded applications. This method attaches to the givenContextFactory
with the given scope. No I/O redirection is performed as withmain(String[])
. -
mainEmbedded
Entry point for embedded applications. This method attaches to the givenContextFactory
with 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.
-