Skip to content

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 ElectronDebugger

Methods

MethodReturnsDescription
addListener(event, listener)thisRegisters a listener for the detach event, emitted when the debugging session is terminated.
addListener(event, listener)thisRegisters a listener for the message event, emitted when the debugging target issues an instrumentation event.
attach(protocolVersion?)voidAttaches the debugger to the web contents.
detach()voidDetaches the debugger from the web contents.
isAttached()booleanReturns whether a debugger is attached to the web contents.
on('detach', listener)thisRegisters a listener for the detach event, emitted when the debugging session is terminated.
on('message', listener)thisRegisters a listener for the message event, emitted when the debugging target issues an instrumentation event.
once(event, listener)thisRegisters a one-time listener for the detach event.
once(event, listener)thisRegisters a one-time listener for the message event.
removeListener(event, listener)thisRemoves a previously registered detach event listener.
removeListener(event, listener)thisRemoves a previously registered message event listener.
sendCommand(method, commandParams?, sessionId?)Promise<unknown>Sends a given command to the debugging target.

Links to this page: