import { DebugSession } from "@vscode/debugadapter";
import { DebugProtocol } from "@vscode/debugprotocol";
import { DevsDbgClient } from "./devsdbgclient";
import { DebugInfo, Image, SrcFile } from "@devicescript/compiler";
import { JDBus } from "jacdac-ts";
export { DevsDbgClient } from "./devsdbgclient";
export interface StartArgs {
    deviceId?: string;
    serviceInstance?: number;
    stopOnEntry?: boolean;
}
export declare class DsDapSession extends DebugSession {
    bus: JDBus;
    private resolvePath;
    private brkBySrc;
    client: DevsDbgClient;
    img: Image;
    private resumeOnSuspend;
    constructor(bus: JDBus, dbg: string | Uint8Array | DebugInfo, resolvePath?: (s: SrcFile) => string);
    dispose(): void;
    finish(): Promise<void>;
    private createClient;
    private startClient;
    protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void;
    protected launchRequest(response: DebugProtocol.LaunchResponse, args: DebugProtocol.LaunchRequestArguments): void;
    protected attachRequest(response: DebugProtocol.AttachResponse, args: DebugProtocol.AttachRequestArguments): void;
    private mapSuspensionReason;
    private handleSuspendedEvent;
    private startDebugger;
    protected configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments, request?: DebugProtocol.Request): void;
    protected threadsRequest(response: DebugProtocol.ThreadsResponse): void;
    protected stackTraceRequest(response: DebugProtocol.StackTraceResponse, args: DebugProtocol.StackTraceArguments): void;
    protected sourceRequest(response: DebugProtocol.SourceResponse, args: DebugProtocol.SourceArguments): void;
    private getFunctionByIdx;
    protected scopesRequest(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments): void;
    protected variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): void;
    protected setBreakPointsRequest(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments): void;
    protected loadedSourcesRequest(response: DebugProtocol.LoadedSourcesResponse, args: DebugProtocol.LoadedSourcesArguments): void;
    protected continueRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void;
    protected pauseRequest(response: DebugProtocol.PauseResponse, args: DebugProtocol.PauseArguments): void;
    protected nextRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void;
    protected stepOutRequest(response: DebugProtocol.StepOutResponse, args: DebugProtocol.StepOutArguments): void;
    protected stepInRequest(response: DebugProtocol.StepInResponse, args: DebugProtocol.StepInArguments): void;
    private stepRequest;
    protected setExceptionBreakPointsRequest(response: DebugProtocol.SetExceptionBreakpointsResponse, args: DebugProtocol.SetExceptionBreakpointsArguments): void;
    protected exceptionInfoRequest(response: DebugProtocol.ExceptionInfoResponse, args: DebugProtocol.ExceptionInfoArguments): void;
    private asyncReq;
    private mapSrcFile;
    private pcToLocation;
    private toVariable;
    private functionName;
    private unquote;
    private valueToString;
    private valueToStringCore;
    private findSource;
    sendLog(msg: string, data?: any, cat?: string): void;
    warn(msg: string, data?: any): void;
    sendEvent<T extends DebugProtocol.Event>(event: T): void;
    sendRequest(command: string, args: any, timeout: number, cb: (response: DebugProtocol.Response) => void): void;
    sendResponse(response: DebugProtocol.Response): void;
    protected dispatchRequest(request: DebugProtocol.Request): void;
}
//# sourceMappingURL=dsdap.d.ts.map