Debugger

external class Debugger : EventEmitter(source)

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun addListener(event: DebuggerEvent.DETACH, listener: (event: Event<*>, reason: String) -> Unit)
fun addListener(event: DebuggerEvent.MESSAGE, listener: (event: Event<*>, method: String, params: Any?, sessionId: String) -> Unit)
Link copied to clipboard
fun attach(protocolVersion: String = definedExternally)

Attaches the debugger to the webContents.

Link copied to clipboard
fun detach()

Detaches the debugger from the webContents.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether a debugger is attached to the webContents.

Link copied to clipboard
fun off(event: DebuggerEvent.DETACH, listener: (event: Event<*>, reason: String) -> Unit)
fun off(event: DebuggerEvent.MESSAGE, listener: (event: Event<*>, method: String, params: Any?, sessionId: String) -> Unit)
Link copied to clipboard
fun on(event: DebuggerEvent.DETACH, listener: (event: Event<*>, reason: String) -> Unit)

Emitted when the debugging session is terminated. This happens either when webContents is closed or devtools is invoked for the attached webContents.

fun on(event: DebuggerEvent.MESSAGE, listener: (event: Event<*>, method: String, params: Any?, sessionId: String) -> Unit)

Emitted whenever the debugging target issues an instrumentation event.

Link copied to clipboard
fun once(event: DebuggerEvent.DETACH, listener: (event: Event<*>, reason: String) -> Unit)
fun once(event: DebuggerEvent.MESSAGE, listener: (event: Event<*>, method: String, params: Any?, sessionId: String) -> Unit)
Link copied to clipboard
fun removeListener(event: DebuggerEvent.DETACH, listener: (event: Event<*>, reason: String) -> Unit)
fun removeListener(event: DebuggerEvent.MESSAGE, listener: (event: Event<*>, method: String, params: Any?, sessionId: String) -> Unit)
Link copied to clipboard
fun sendCommand(method: String, commandParams: Any? = definedExternally, sessionId: String = definedExternally): Promise<Any?>

A promise that resolves with the response defined by the 'returns' attribute of the command description in the remote debugging protocol or is rejected indicating the failure of the command.

Link copied to clipboard