ElectronDebugger
Unofficial
A debugger instance for a web contents, used to communicate with the Chrome DevTools Protocol.
Import:
import type { ElectronDebugger } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface ElectronDebuggerMethods
| Method | Returns | Description | |
|---|---|---|---|
| addListener(event, listener) | this | Registers a listener for the detach event, emitted when the debugging session is terminated. | |
| addListener(event, listener) | this | Registers a listener for the message event, emitted when the debugging target issues an instrumentation event. | |
| attach(protocolVersion?) | void | Attaches the debugger to the web contents. | |
| detach() | void | Detaches the debugger from the web contents. | |
| isAttached() | boolean | Returns whether a debugger is attached to the web contents. | |
| on('detach', listener) | this | Registers a listener for the detach event, emitted when the debugging session is terminated. | |
| on('message', listener) | this | Registers a listener for the message event, emitted when the debugging target issues an instrumentation event. | |
| once(event, listener) | this | Registers a one-time listener for the detach event. | |
| once(event, listener) | this | Registers a one-time listener for the message event. | |
| removeListener(event, listener) | this | Removes a previously registered detach event listener. | |
| removeListener(event, listener) | this | Removes a previously registered message event listener. | |
| sendCommand(method, commandParams?, sessionId?) | Promise<unknown> | Sends a given command to the debugging target. |
Links to this page: