API reference / @jsprismarine/script-host / debugger/EngineDebugger
debugger/EngineDebugger
Classes
Interfaces
DebugFrame
Defined in: script-host/src/debugger/EngineDebugger.ts:52
One frame of a stopped script's stack.
Properties
column
readonlycolumn:number
Defined in: script-host/src/debugger/EngineDebugger.ts:60
The 1-based column, 0 in a native frame.
file
readonlyfile:string
Defined in: script-host/src/debugger/EngineDebugger.ts:56
The file name, as the script's stack traces show it; empty for a native frame.
line
readonlyline:number
Defined in: script-host/src/debugger/EngineDebugger.ts:58
The 1-based line, 0 in a native frame.
name
readonlyname:string
Defined in: script-host/src/debugger/EngineDebugger.ts:54
The function's name, empty for an anonymous one.
DebugProperty
Defined in: script-host/src/debugger/EngineDebugger.ts:76
One own property of an object, read without running its getter.
Properties
accessor
readonlyaccessor:boolean
Defined in: script-host/src/debugger/EngineDebugger.ts:79
True for a getter or setter, whose value the debugger never reads.
name
readonlyname:string
Defined in: script-host/src/debugger/EngineDebugger.ts:77
value
readonlyvalue:ScriptValue
Defined in: script-host/src/debugger/EngineDebugger.ts:81
The value, which the caller frees when it is a handle. Undefined for an accessor.
DebuggerHost
Defined in: script-host/src/debugger/EngineDebugger.ts:92
What a debugger needs of its engine; ScriptEngine provides it.
Properties
buffer
readonlybuffer:TransferBuffer
Defined in: script-host/src/debugger/EngineDebugger.ts:94
native
readonlynative:NativeSymbols
Defined in: script-host/src/debugger/EngineDebugger.ts:93
Methods
check()
check(
result):number
Defined in: script-host/src/debugger/EngineDebugger.ts:98
Turns a negative status into the error the engine described.
Parameters
result
number
Returns
number
detached()
detached():
void
Defined in: script-host/src/debugger/EngineDebugger.ts:102
Tells the engine the debugger has detached.
Returns
void
pointer()
pointer():
bigint
Defined in: script-host/src/debugger/EngineDebugger.ts:96
The engine's pointer, or a throw once it has been destroyed.
Returns
bigint
take()
take(
handle):ScriptValue
Defined in: script-host/src/debugger/EngineDebugger.ts:100
Reads a result handle's value, freeing the handle unless the value is an object.
Parameters
handle
number
Returns
DebuggerListener
Defined in: script-host/src/debugger/EngineDebugger.ts:37
Receives the engine's debugger events. Both run synchronously on the engine's thread, inside the engine call that runs the script, so the script and everything waiting on it stay blocked.
Methods
paused()
paused(
reason):PauseOutcome
Defined in: script-host/src/debugger/EngineDebugger.ts:43
The script stopped. The listener reads it through the EngineDebugger, calls EngineDebugger.resume to say how it goes on, and returns. Returning 'terminate' stops the script as if it had run out of steps.
Parameters
reason
"breakpoint" | "step" | "exception" | "pause"
Returns
poll()
poll():
void
Defined in: script-host/src/debugger/EngineDebugger.ts:48
A running script has passed the number of lines the debugger polls at. The listener reads what the debugger has sent without waiting, and must not run script.
Returns
void
PropertyPage
Defined in: script-host/src/debugger/EngineDebugger.ts:85
A page of an object's own properties.
Properties
properties
readonlyproperties: readonlyDebugProperty[]
Defined in: script-host/src/debugger/EngineDebugger.ts:88
total
readonlytotal:number
Defined in: script-host/src/debugger/EngineDebugger.ts:87
How many own properties the object has in all.
ValueDescription
Defined in: script-host/src/debugger/EngineDebugger.ts:67
A value the engine described without running script.
Properties
detail
readonlydetail:string|number|undefined
Defined in: script-host/src/debugger/EngineDebugger.ts:72
An array's length or an error's message.
kind
readonlykind:DescribedKind
Defined in: script-host/src/debugger/EngineDebugger.ts:68
name
readonlyname:string|undefined
Defined in: script-host/src/debugger/EngineDebugger.ts:70
A constructor's or function's name, a symbol's description or a bigint's digits.
Type Aliases
DescribedKind
DescribedKind =
"object"|"array"|"function"|"error"|"proxy"|"symbol"|"bigint"
Defined in: script-host/src/debugger/EngineDebugger.ts:64
The kinds of value EngineDebugger.describe tells apart.
PauseOutcome
PauseOutcome =
"resume"|"terminate"
Defined in: script-host/src/debugger/EngineDebugger.ts:31
What the host does with a script once it has handled a stop.
PauseReason
PauseReason = typeof
PauseReason[number]
Defined in: script-host/src/debugger/EngineDebugger.ts:13
Why a script stopped: at a breakpoint, after a step, on a thrown value, or on request.
ResumeMode
ResumeMode = keyof typeof
ResumeMode
Defined in: script-host/src/debugger/EngineDebugger.ts:19
How a stopped script goes on.
ScopeKind
ScopeKind = keyof typeof
ScopeKind
Defined in: script-host/src/debugger/EngineDebugger.ts:25
Which variables of a frame a scope holds: its own, those it closes over, or the global object.
Variables
PauseReason
constPauseReason: readonly ["breakpoint","step","exception","pause"]
Defined in: script-host/src/debugger/EngineDebugger.ts:13
Why a script stopped, by the jsh_debug_reason code the engine sends.
ResumeMode
constResumeMode:object
Defined in: script-host/src/debugger/EngineDebugger.ts:19
How a stopped script goes on, by its jsh_debug_resume code.
Type Declaration
continue
readonlycontinue:0=0
stepIn
readonlystepIn:2=2
stepOut
readonlystepOut:3=3
stepOver
readonlystepOver:1=1
ScopeKind
constScopeKind:object
Defined in: script-host/src/debugger/EngineDebugger.ts:25
The variables of a frame, by their jsh_debug_scope code.
Type Declaration
closure
readonlyclosure:1=1
global
readonlyglobal:2=2
local
readonlylocal:0=0