Representation of a memory provider. It is only necessary to implement a new Memory Provider if the behavior of the Debug Adapter for a given session type deviates from the Debug Adapter Protocol. Otherwise, the DefaultMemoryProvider should handle standard DAP requests and responses.

Specific peculiarities that might require special handling include: restrictions on the formatting of memory location identifiers (only hex numbers, e.g.) or deviations from the DAP in the format of the response to a given request.

interface MemoryProvider {
    canHandle(session): boolean;
    formatVariableReference?(session, variable?): string;
    getLocals?(session): Promise<VariableRange[]>;
    readMemory(session, readMemoryArguments): Promise<MemoryReadResult>;
    supportsVariableReferenceSyntax?(session, variable?): boolean;
    writeMemory?(session, writeMemoryArguments): Promise<WriteMemoryResponse>;
}

Methods

  • Whether the current debugger supports variable reference syntax (e.g. &a) in the memoryReference field of

    Parameters

    • session: DebugSession
    • Optional variable: DebugVariable

    Returns boolean

    Link

    DebugProtocol.ReadMemoryArguments, ReadMemoryArguments}