mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
add proposed 'startDebugging' API
This commit is contained in:
@@ -467,6 +467,9 @@ export function createApiFactory(
|
||||
get activeDebugSession() {
|
||||
return extHostDebugService.activeDebugSession;
|
||||
},
|
||||
startDebugging: proposedApiFunction(extension, (nameOrConfig: string | vscode.DebugConfiguration) => {
|
||||
return extHostDebugService.startDebugging(nameOrConfig);
|
||||
}),
|
||||
startDebugSession(config: vscode.DebugConfiguration) {
|
||||
return extHostDebugService.startDebugSession(config);
|
||||
},
|
||||
|
||||
@@ -345,6 +345,7 @@ export abstract class MainThreadSCMShape {
|
||||
export type DebugSessionUUID = string;
|
||||
|
||||
export abstract class MainThreadDebugServiceShape {
|
||||
$startDebugging(nameOrConfig: string | vscode.DebugConfiguration): TPromise<boolean> { throw ni(); }
|
||||
$startDebugSession(config: vscode.DebugConfiguration): TPromise<DebugSessionUUID> { throw ni(); }
|
||||
$customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): TPromise<any> { throw ni(); }
|
||||
}
|
||||
|
||||
@@ -45,6 +45,11 @@ export class ExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
this._debugServiceProxy = threadService.get(MainContext.MainThreadDebugService);
|
||||
}
|
||||
|
||||
public startDebugging(nameOrConfig: string | vscode.DebugConfiguration): TPromise<boolean> {
|
||||
|
||||
return this._debugServiceProxy.$startDebugging(nameOrConfig);
|
||||
}
|
||||
|
||||
public startDebugSession(config: vscode.DebugConfiguration): TPromise<vscode.DebugSession> {
|
||||
|
||||
return this._debugServiceProxy.$startDebugSession(config).then((id: DebugSessionUUID) => {
|
||||
|
||||
Reference in New Issue
Block a user