import { IRPCProtocol } from '@opensumi/ide-connection';
import { Event, IJSONSchema, IJSONSchemaSnippet } from '@opensumi/ide-core-common';
import { DebugConfiguration, DebugStreamConnection, IDebugSessionDTO, IDebuggerContribution } from '@opensumi/ide-debug';
import { CustomChildProcessModule } from '../../../../common/ext.process';
import { IExtHostCommands, IExtHostDebugService, IInterProcessConnectionService, IMainThreadDebug } from '../../../../common/vscode';
import { Breakpoint } from '../../../../common/vscode/models';
import type vscode from 'vscode';
export declare function createDebugApiFactory(extHostDebugService: IExtHostDebugService): typeof vscode.debug;
export declare class ExtHostDebugSession implements vscode.DebugSession {
    private _debugServiceProxy;
    private _id;
    private _type;
    private _name;
    private _workspaceFolder;
    private _configuration;
    private _parentSession;
    constructor(_debugServiceProxy: IMainThreadDebug, _id: string, _type: string, _name: string, _workspaceFolder: vscode.WorkspaceFolder | undefined, _configuration: vscode.DebugConfiguration, _parentSession: vscode.DebugSession | undefined);
    get id(): string;
    get type(): string;
    get name(): string;
    set name(name: string);
    get parentSession(): vscode.DebugSession | undefined;
    get workspaceFolder(): vscode.WorkspaceFolder | undefined;
    get configuration(): vscode.DebugConfiguration;
    customRequest(command: string, args: any): Promise<any>;
    getDebugProtocolBreakpoint(breakpoint: vscode.Breakpoint): Promise<vscode.DebugProtocolBreakpoint | undefined>;
}
export declare class ExtHostDebug implements IExtHostDebugService {
    private extHostConnectionService;
    private extHostCommand;
    private cp?;
    private readonly onDidChangeBreakpointsEmitter;
    private readonly onDidChangeActiveDebugSessionEmitter;
    private readonly onDidTerminateDebugSessionEmitter;
    private readonly onDidStartDebugSessionEmitter;
    private readonly onDidReceiveDebugSessionCustomEmitter;
    private sessions;
    private debuggersContributions;
    private contributionPaths;
    private configurationProviders;
    private trackerFactories;
    private descriptorFactories;
    private proxy;
    activeDebugSession: vscode.DebugSession | undefined;
    breakpoints: Breakpoint[];
    activeDebugConsole: vscode.DebugConsole;
    constructor(rpc: IRPCProtocol, extHostConnectionService: IInterProcessConnectionService, extHostCommand: IExtHostCommands, cp?: CustomChildProcessModule | undefined);
    get onDidChangeBreakpoints(): Event<vscode.BreakpointsChangeEvent>;
    get onDidReceiveDebugSessionCustomEvent(): Event<vscode.DebugSessionCustomEvent>;
    get onDidChangeActiveDebugSession(): Event<vscode.DebugSession | undefined>;
    get onDidTerminateDebugSession(): Event<vscode.DebugSession>;
    get onDidStartDebugSession(): Event<vscode.DebugSession>;
    /**
     * 注册贡献点
     * @param extensionPath 拓展路径
     * @param contributions 有效的贡献点
     */
    registerDebuggersContributions(extensionPath: string, contributions: IDebuggerContribution[]): void;
    /**
     * 添加断点
     */
    addBreakpoints(breakpoints: vscode.Breakpoint[]): Promise<void>;
    /**
     * 移除断点
     * @param breakpoints
     */
    removeBreakpoints(breakpoints: vscode.Breakpoint[]): Promise<void>;
    /**
     * 将调试资源转换为可访问的Uri
     * @param {vscode.DebugProtocolSource} source
     * @param {vscode.DebugSession} [session]
     */
    asDebugSourceUri(src: vscode.DebugProtocolSource, session?: vscode.DebugSession): vscode.Uri;
    /**
     * 启动调试
     * @param folder
     * @param nameOrConfig
     * @param parentSession
     */
    startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration, parentSessionOrOptions?: vscode.DebugSession | vscode.DebugSessionOptions): Promise<boolean>;
    stopDebugging(session?: vscode.DebugSession): Promise<void>;
    registerDebugConfigurationProvider(type: string, provider: vscode.DebugConfigurationProvider, trigger: vscode.DebugConfigurationProviderTriggerKind): vscode.Disposable;
    registerDebugAdapterDescriptorFactory(type: string, factory: vscode.DebugAdapterDescriptorFactory): vscode.Disposable;
    registerDebugAdapterTrackerFactory(type: string, factory: vscode.DebugAdapterTrackerFactory): vscode.Disposable;
    $onSessionCustomEvent(sessionId: string, event: string, body?: any): Promise<void>;
    $sessionDidStart(sessionId: string): Promise<void>;
    $sessionDidDestroy(sessionId: string): Promise<void>;
    $sessionDidChange(sessionId: string | undefined): Promise<void>;
    $breakpointsDidChange(all: Breakpoint[], added: Breakpoint[], removed: Breakpoint[], changed: Breakpoint[]): Promise<void>;
    $createDebugSession(debugConfigurationDTO: IDebugSessionDTO): Promise<string>;
    $terminateDebugSession(sessionId: string): Promise<void>;
    $getSupportedLanguages(debugType: string): Promise<string[]>;
    $getSchemaAttributes(debugType: string): Promise<IJSONSchema[]>;
    $getConfigurationSnippets(debugType: string): Promise<IJSONSchemaSnippet[]>;
    $getTerminalCreationOptions(debugType: string): Promise<undefined>;
    doGetTerminalCreationOptions(debugType: string): Promise<undefined>;
    $getDebugConfigurationProvidersCount(debugType: string, triggerKind?: vscode.DebugConfigurationProviderTriggerKind): Promise<number>;
    $provideDebugConfigurations(debugType: string, workspaceFolderUri: string | undefined, token?: vscode.CancellationToken, triggerKind?: vscode.DebugConfigurationProviderTriggerKind): Promise<vscode.DebugConfiguration[]>;
    $resolveDebugConfigurations(debugConfiguration: DebugConfiguration, workspaceFolderUri: string | undefined, token?: vscode.CancellationToken): Promise<vscode.DebugConfiguration | undefined | null>;
    $resolveDebugConfigurationWithSubstitutedVariables(debugConfiguration: DebugConfiguration, workspaceFolderUri: string | undefined, token?: vscode.CancellationToken): Promise<vscode.DebugConfiguration | undefined | null>;
    $registerDebuggerContributions(extensionFolder: string, contributions: IDebuggerContribution[]): Promise<void>;
    $unregisterDebuggerContributions(contributions: IDebuggerContribution[]): Promise<void>;
    protected createDebugAdapterTracker(session: vscode.DebugSession): Promise<vscode.DebugAdapterTracker>;
    protected getDebugAdapterDescriptor(session: vscode.DebugSession, executable?: vscode.DebugAdapterExecutable): Promise<vscode.DebugAdapterDescriptor | undefined | null>;
    protected createCommunicationProvider(session: vscode.DebugSession, debugConfiguration: vscode.DebugConfiguration): Promise<DebugStreamConnection>;
    protected resolveDebugAdapterExecutable(debugConfiguration: vscode.DebugConfiguration): Promise<vscode.DebugAdapterExecutable | undefined>;
    private toWorkspaceFolder;
    private convertToDto;
}
//# sourceMappingURL=ext.host.debug.d.ts.map