circu.js
    Preparing search index...

    Interface DebugChannelMain

    Main-thread channel handle. Owns one ref; call stop() before dropping.

    interface DebugChannelMain {
        notify(evType: number, payload: any): boolean;
        reply(id: number, result: any): boolean;
        stop(): void;
        waitRequest(): | {
            id: number;
            kind: number;
            method: string;
            params: unknown;
        }
        | { kind: number; step: number };
    }
    Index

    Methods

    • Send an event (e.g. EV_PAUSED/EV_RESUMED) to the worker.

      Parameters

      • evType: number
      • payload: any

      Returns boolean

    • Reply to an inspect request previously returned by waitRequest().

      Parameters

      • id: number
      • result: any

      Returns boolean

    • Detach the weak trace pointer (if ours) and release this ref.

      Returns void

    • Block until the worker sends an inspect request or a resume signal. Control messages (breakpoints/step) are applied in C and never returned. Throws InternalError (EAGAIN) when stop() is called (channel torn down).

      Returns
          | { id: number; kind: number; method: string; params: unknown }
          | { kind: number; step: number }