public interface JavascriptVm
Modifier and Type | Interface and Description |
---|---|
static interface |
JavascriptVm.BreakpointCallback
A callback for breakpoint-related requests.
|
static class |
JavascriptVm.ExceptionCatchMode
Defines when VM will break on exception throw (before stack unwind happened).
|
static interface |
JavascriptVm.ListBreakpointsCallback |
static interface |
JavascriptVm.ScriptsCallback
A callback for retrieving scripts.
|
static interface |
JavascriptVm.SuspendCallback
A callback for suspend request.
|
Modifier and Type | Method and Description |
---|---|
boolean |
detach()
Detaches from the related tab debugger.
|
RelayOk |
enableBreakpoints(java.lang.Boolean enabled,
GenericCallback<java.lang.Boolean> callback,
SyncCallback syncCallback)
Asynchronously enables or disables all breakpoints on remote.
|
BreakpointTypeExtension |
getBreakpointTypeExtension() |
FunctionScopeExtension |
getFunctionScopeExtension() |
IgnoreCountBreakpointExtension |
getIgnoreCountBreakpointExtension() |
RestartFrameExtension |
getRestartFrameExtension() |
void |
getScripts(JavascriptVm.ScriptsCallback callback)
Returns user scripts loaded into the tab.
|
Version |
getVersion() |
boolean |
isAttached() |
RelayOk |
listBreakpoints(JavascriptVm.ListBreakpointsCallback callback,
SyncCallback syncCallback)
Asynchronously reads breakpoints from remote VM.
|
RelayOk |
setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode,
GenericCallback<JavascriptVm.ExceptionCatchMode> callback,
SyncCallback syncCallback)
Controls whether VM stops on exceptions. 3 catch modes are supported.
|
RelayOk |
setBreakpoint(Breakpoint.Target target,
int line,
int column,
boolean enabled,
java.lang.String condition,
JavascriptVm.BreakpointCallback callback,
SyncCallback syncCallback)
Sets a breakpoint with the specified parameters.
|
void |
suspend(JavascriptVm.SuspendCallback callback)
Tries to suspend VM.
|
boolean detach()
boolean isAttached()
void getScripts(JavascriptVm.ScriptsCallback callback) throws MethodIsBlockingException
Some scripts could be already collected when the method is called. They can be missed in the result list.
callback
- that synchronously receives result, may be null
MethodIsBlockingException
- because it may need to actually load scriptsRelayOk setBreakpoint(Breakpoint.Target target, int line, int column, boolean enabled, java.lang.String condition, JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback)
target
- of the breakpointline
- in the script or function (0-based). If none, use
Breakpoint.EMPTY_VALUE
column
- of the target start within the line (0-based). If none, use
Breakpoint.EMPTY_VALUE
enabled
- whether the breakpoint is enabled initiallycondition
- nullable string with breakpoint conditioncallback
- to invoke when the evaluation result is ready,
may be null
void suspend(JavascriptVm.SuspendCallback callback)
DebugEventListener.suspended(DebugContext)
will be called.callback
- to invoke once the operation result is available,
may be null
RelayOk listBreakpoints(JavascriptVm.ListBreakpointsCallback callback, SyncCallback syncCallback)
Breakpoint
instances are preserved.RelayOk enableBreakpoints(java.lang.Boolean enabled, GenericCallback<java.lang.Boolean> callback, SyncCallback syncCallback)
Breakpoint
s. Method call
with a null value and not null callback simply returns current value.enabled
- new value to set or nullcallback
- receives current value if succeed or error messageRelayOk setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, GenericCallback<JavascriptVm.ExceptionCatchMode> callback, SyncCallback syncCallback)
catchMode
- new mode or null to keep the current modecallback
- gets invoked when operation is finished and receives current mode
as a value (may receive null if actual mode doesn't fit into JavascriptVm.ExceptionCatchMode
type)Version getVersion()
BreakpointTypeExtension getBreakpointTypeExtension()
IgnoreCountBreakpointExtension getIgnoreCountBreakpointExtension()
FunctionScopeExtension getFunctionScopeExtension()
RestartFrameExtension getRestartFrameExtension()
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.