Interface IDebugger

An interface describing an application's visual debugger.

interface IDebugger {
    config: IDebugger.IConfig;
    eventMessage: ISignal<IDebugger, Event>;
    isStarted: boolean;
    model: IService;
    pauseOnExceptionChanged: Signal<IDebugger, void>;
    session: null | IDebugger.ISession;
    sessionChanged: ISignal<IDebugger, null | IDebugger.ISession>;
    clearBreakpoints(): Promise<void>;
    continue(): Promise<void>;
    copyToGlobals(name: string): Promise<void>;
    displayDefinedVariables(): Promise<void>;
    displayModules(): Promise<void>;
    evaluate(
        expression: string,
    ): Promise<
        | null
        | {
            indexedVariables?: number;
            memoryReference?: string;
            namedVariables?: number;
            presentationHint?: VariablePresentationHint;
            result: string;
            type?: string;
            variablesReference: number;
        },
    >;
    getCodeId(code: string): string;
    getDebuggerState(): State;
    getSource(source: Source): Promise<Source>;
    hasStoppedThreads(): boolean;
    inspectRichVariable(
        variableName: string,
        frameId?: number,
    ): Promise<IRichVariable>;
    inspectVariable(variablesReference: number): Promise<Variable[]>;
    isAvailable(connection: Session.ISessionConnection): Promise<boolean>;
    next(): Promise<void>;
    pause(): Promise<void>;
    pauseOnExceptions(exceptionFilter: string[]): Promise<void>;
    pauseOnExceptionsFilter(exceptionFilter: string): Promise<void>;
    pauseOnExceptionsIsValid(): boolean;
    restart(): Promise<void>;
    restoreDebuggerState(state: State): Promise<boolean>;
    restoreState(autoStart: boolean): Promise<void>;
    start(): Promise<void>;
    stepIn(): Promise<void>;
    stepOut(): Promise<void>;
    stop(): Promise<void>;
    updateBreakpoints(
        code: string,
        breakpoints: IBreakpoint[],
        path?: string,
    ): Promise<void>;
}

Properties

Get debugger config.

eventMessage: ISignal<IDebugger, Event>

Signal emitted for debug event messages.

isStarted: boolean

Whether the current debugger is started.

model: IService

The debugger service's model.

pauseOnExceptionChanged: Signal<IDebugger, void>

A signal emitted when the pause on exception filter changes.

session: null | IDebugger.ISession

The current debugger session.

sessionChanged: ISignal<IDebugger, null | IDebugger.ISession>

Signal emitted upon session changed.

Methods

  • Evaluate an expression.

    Parameters

    • expression: string

    Returns Promise<
        | null
        | {
            indexedVariables?: number;
            memoryReference?: string;
            namedVariables?: number;
            presentationHint?: VariablePresentationHint;
            result: string;
            type?: string;
            variablesReference: number;
        },
    >

  • Request rich representation of a variable.

    Parameters

    • variableName: string

      The variable name to request

    • OptionalframeId: number

      The current frame id in which to request the variable

    Returns Promise<IRichVariable>

    The mime renderer data model

  • Request variables for a given variable reference.

    Parameters

    • variablesReference: number

      The variable reference to request.

    Returns Promise<Variable[]>

  • Update all breakpoints of a cell at once.

    Parameters

    • code: string

      The code in the cell where the breakpoints are set.

    • breakpoints: IBreakpoint[]

      The list of breakpoints to set.

    • Optionalpath: string

      Optional path to the file where to set the breakpoints.

    Returns Promise<void>