diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 506f82a9d8d..b5dabbf6b3a 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -765,11 +765,11 @@ declare module 'vscode' { export namespace debug { /** - * Stop the given debug session or stop all debug sessions if no session is specified. - * @param session The [debug session](#DebugSession) to stop or `undefined` for stopping all sessions. + * Stop the given debug session or stop all debug sessions if session is omitted. + * @param session The [debug session](#DebugSession) to stop; if omitted all sessions are stopped. * @return A thenable that resolves when the sessions could be stopped successfully. */ - export function stopDebugging(session: DebugSession | undefined): Thenable; + export function stopDebugging(session?: DebugSession): Thenable; } //#endregion diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 68dccbedc5b..97793666ad8 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -870,7 +870,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I } return extHostDebugService.startDebugging(folder, nameOrConfig, parentSessionOrOptions || {}); }, - stopDebugging(session: vscode.DebugSession | undefined) { + stopDebugging(session?: vscode.DebugSession) { return extHostDebugService.stopDebugging(session); }, addBreakpoints(breakpoints: vscode.Breakpoint[]) { diff --git a/src/vs/workbench/api/common/extHostDebugService.ts b/src/vs/workbench/api/common/extHostDebugService.ts index f9dcbecccef..82121bcb2c6 100644 --- a/src/vs/workbench/api/common/extHostDebugService.ts +++ b/src/vs/workbench/api/common/extHostDebugService.ts @@ -51,7 +51,7 @@ export interface IExtHostDebugService extends ExtHostDebugServiceShape { addBreakpoints(breakpoints0: vscode.Breakpoint[]): Promise; removeBreakpoints(breakpoints0: vscode.Breakpoint[]): Promise; startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration, options: vscode.DebugSessionOptions): Promise; - stopDebugging(session: vscode.DebugSession | undefined): Promise; + stopDebugging(session?: vscode.DebugSession): Promise; registerDebugConfigurationProvider(type: string, provider: vscode.DebugConfigurationProvider, trigger: vscode.DebugConfigurationProviderTriggerKind): vscode.Disposable; registerDebugAdapterDescriptorFactory(extension: IExtensionDescription, type: string, factory: vscode.DebugAdapterDescriptorFactory): vscode.Disposable; registerDebugAdapterTrackerFactory(type: string, factory: vscode.DebugAdapterTrackerFactory): vscode.Disposable; @@ -302,7 +302,7 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E }); } - public stopDebugging(session: vscode.DebugSession | undefined): Promise { + public stopDebugging(session?: vscode.DebugSession): Promise { return this._debugServiceProxy.$stopDebugging(session ? session.id : undefined); }