提交 ec5b0498 编写于 作者: A Andre Weinand

make proposed Debug API official; fixes #30096

上级 4181c1d3
......@@ -5317,6 +5317,69 @@ declare module 'vscode' {
export function createSourceControl(id: string, label: string): SourceControl;
}
/**
* Configuration for a debug session.
*/
export interface DebugConfiguration {
/**
* The type for the debug session.
*/
type: string;
/**
* An optional name for the debug session.
*/
name?: string;
/**
* The request type of the debug session.
*/
request: string;
/**
* Additional debug type specific properties.
*/
[key: string]: any;
}
/**
* A debug session.
*/
export interface DebugSession {
/**
* The debug session's type from the debug configuration.
*/
readonly type: string;
/**
* The debug session's name from the debug configuration.
*/
readonly name: string;
/**
* Send a custom request to the debug adapter.
*/
customRequest(command: string, args?: any): Thenable<any>;
}
/**
* Namespace for dealing with debug sessions.
*/
export namespace debug {
/**
* An [event](#Event) which fires when a debug session has terminated.
*/
export const onDidTerminateDebugSession: Event<DebugSession>;
/**
* Create a new debug session based on the given configuration.
* @param configuration
*/
export function createDebugSession(configuration: DebugConfiguration): Thenable<DebugSession>;
}
/**
* Namespace for dealing with installed extensions. Extensions are represented
* by an [extension](#Extension)-interface which allows to reflect on them.
......
......@@ -189,67 +189,4 @@ declare module 'vscode' {
*/
onData(callback: (data: string) => any): void;
}
/**
* Namespace for dealing with debug sessions.
*/
export namespace debug {
/**
* An [event](#Event) which fires when a debug session has terminated.
*/
export const onDidTerminateDebugSession: Event<DebugSession>;
/**
* Create a new debug session based on the given launchConfig.
* @param launchConfig
*/
export function createDebugSession(launchConfig: DebugConfiguration): Thenable<DebugSession>;
}
/**
* Configuration for a debug session.
*/
export interface DebugConfiguration {
/**
* The type for the debug session.
*/
type: string;
/**
* An optional name for the debug session.
*/
name?: string;
/**
* The request type of the debug session.
*/
request: string;
/**
* Additional debug type specific properties.
*/
[key: string]: any;
}
/**
* A debug session.
*/
export interface DebugSession {
/**
* The debug session's type from the debug configuration.
*/
readonly type: string;
/**
* The debug session's name from the debug configuration.
*/
readonly name: string;
/**
* Send a custom request to the debug adapter.
*/
customRequest(command: string, args?: any): Thenable<any>;
}
}
......@@ -463,12 +463,12 @@ export function createApiFactory(
// namespace: debug
const debug: typeof vscode.debug = {
createDebugSession: proposedApiFunction(extension, (config: vscode.DebugConfiguration) => {
createDebugSession(config: vscode.DebugConfiguration) {
return extHostDebugService.createDebugSession(config);
}),
onDidTerminateDebugSession: proposedApiFunction(extension, (listener, thisArg?, disposables?) => {
},
onDidTerminateDebugSession(listener, thisArg?, disposables?) {
return extHostDebugService.onDidTerminateDebugSession(listener, thisArg, disposables);
})
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册