Events emitted by IDFMonitor. gdb_stub, coredump, and flash use the esp-idf-monitor IDE names. Payloads carry bytes instead of filesystem paths.

interface MonitorEventMap {
    address: {
        address: number;
        trace: AddressFrame[];
    };
    close: Record<string, never>;
    coredump: {
        base64: string;
        progName?: string;
    };
    coredump-progress: {
        bytes: number;
    };
    coredump-prompt: Record<string, never>;
    coredump-start: Record<string, never>;
    decode-warning: Record<string, never>;
    elf-sha256: {
        built?: string;
        flashed: string;
        match: boolean;
    };
    exit: {
        code: number;
    };
    flash: {
        encrypted: boolean;
        full: boolean;
        target: FlashTarget;
    };
    gdb_stub: {
        packet: string;
        progName?: string;
    };
    host-command: {
        args: string;
        type: string;
    };
    line: {
        printed: boolean;
        text: string;
    };
    log-toggle: {
        enabled: boolean;
        text?: string;
    };
    menu: {
        action: MenuAction;
    };
    open: {
        baud: number;
        port: SerialPortInfo;
    };
    output-toggle: {
        enabled: boolean;
    };
    panic: {
        frames: AddressFrame[];
        text: string;
    };
    panic-start: Record<string, never>;
    reconnect: {
        baud: number;
        port: SerialPortInfo;
    };
    reconnect-wait: {
        error: string;
    };
    reset: {
        kind: "custom" | "bootloader" | "hard";
    };
    timestamps-toggle: {
        enabled: boolean;
    };
    write: {
        data: Uint8Array;
    };
}

Properties

address: {
    address: number;
    trace: AddressFrame[];
}

One resolved address.

Type declaration

close: Record<string, never>

The port was closed by IDFMonitor.stop.

coredump: {
    base64: string;
    progName?: string;
}

Core dump finished. base64 is the body with newlines removed.

Type declaration

  • base64: string
  • Optional progName?: string
coredump-progress: {
    bytes: number;
}

The in-memory core dump grew by another KiB.

Type declaration

  • bytes: number
coredump-prompt: Record<string, never>

The chip asked for Enter before printing a core dump. The monitor sends a newline.

coredump-start: Record<string, never>

Core-dump body started. Chip output is muted until the end banner.

decode-warning: Record<string, never>

Three UTF-8 decode failures in a row.

elf-sha256: {
    built?: string;
    flashed: string;
    match: boolean;
}

The chip printed ELF file SHA256:.

Type declaration

  • Optional built?: string
  • flashed: string
  • match: boolean
exit: {
    code: number;
}

Session finished. 110 is an expect timeout, 2 is a script error, 1 is an open failure.

Type declaration

  • code: number
flash: {
    encrypted: boolean;
    full: boolean;
    target: FlashTarget;
}

The operator asked to flash. The page closes the monitor and runs esptool-js.

Type declaration

gdb_stub: {
    packet: string;
    progName?: string;
}

A checksum-valid gdbstub stop packet. The read loop is released and the port stays open.

Type declaration

  • packet: string
  • Optional progName?: string
host-command: {
    args: string;
    type: string;
}

The chip printed IDF_MONITOR_EXECUTE_<TYPE>. The page decides whether to run it.

Type declaration

  • args: string
  • type: string
line: {
    printed: boolean;
    text: string;
}

One decoded chip line. printed is false when the filter or a mute hid it.

Type declaration

  • printed: boolean
  • text: string
log-toggle: {
    enabled: boolean;
    text?: string;
}

Log capture started or stopped. text is the capture when stopping.

Type declaration

  • enabled: boolean
  • Optional text?: string
menu: {
    action: MenuAction;
}

A menu command ran.

Type declaration

open: {
    baud: number;
    port: SerialPortInfo;
}

First successful open.

Type declaration

  • baud: number
  • port: SerialPortInfo
output-toggle: {
    enabled: boolean;
}

Chip output was shown or hidden.

Type declaration

  • enabled: boolean
panic: {
    frames: AddressFrame[];
    text: string;
}

A panic dump finished, with addresses resolved against the loaded ELFs.

Type declaration

panic-start: Record<string, never>

A panic register dump started. Only when panic decode is backtrace.

reconnect: {
    baud: number;
    port: SerialPortInfo;
}

The port was reopened. The chip is not reset again.

Type declaration

  • baud: number
  • port: SerialPortInfo
reconnect-wait: {
    error: string;
}

The device disappeared, or a cold open is about to retry.

Type declaration

  • error: string
reset: {
    kind: "custom" | "bootloader" | "hard";
}

A DTR/RTS sequence finished.

Type declaration

  • kind: "custom" | "bootloader" | "hard"
timestamps-toggle: {
    enabled: boolean;
}

Timestamps were turned on or off.

Type declaration

  • enabled: boolean
write: {
    data: Uint8Array;
}

Bytes about to be written to the device.

Type declaration

  • data: Uint8Array