Skip to content

Commit 95dcdf2

Browse files
committed
make session arg optional; fixes microsoft#103934
1 parent e0e68a9 commit 95dcdf2

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/vs/vscode.proposed.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,11 +765,11 @@ declare module 'vscode' {
765765
export namespace debug {
766766

767767
/**
768-
* Stop the given debug session or stop all debug sessions if no session is specified.
769-
* @param session The [debug session](#DebugSession) to stop or `undefined` for stopping all sessions.
768+
* Stop the given debug session or stop all debug sessions if session is omitted.
769+
* @param session The [debug session](#DebugSession) to stop; if omitted all sessions are stopped.
770770
* @return A thenable that resolves when the sessions could be stopped successfully.
771771
*/
772-
export function stopDebugging(session: DebugSession | undefined): Thenable<void>;
772+
export function stopDebugging(session?: DebugSession): Thenable<void>;
773773
}
774774

775775
//#endregion

src/vs/workbench/api/common/extHost.api.impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
870870
}
871871
return extHostDebugService.startDebugging(folder, nameOrConfig, parentSessionOrOptions || {});
872872
},
873-
stopDebugging(session: vscode.DebugSession | undefined) {
873+
stopDebugging(session?: vscode.DebugSession) {
874874
return extHostDebugService.stopDebugging(session);
875875
},
876876
addBreakpoints(breakpoints: vscode.Breakpoint[]) {

src/vs/workbench/api/common/extHostDebugService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface IExtHostDebugService extends ExtHostDebugServiceShape {
5151
addBreakpoints(breakpoints0: vscode.Breakpoint[]): Promise<void>;
5252
removeBreakpoints(breakpoints0: vscode.Breakpoint[]): Promise<void>;
5353
startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration, options: vscode.DebugSessionOptions): Promise<boolean>;
54-
stopDebugging(session: vscode.DebugSession | undefined): Promise<void>;
54+
stopDebugging(session?: vscode.DebugSession): Promise<void>;
5555
registerDebugConfigurationProvider(type: string, provider: vscode.DebugConfigurationProvider, trigger: vscode.DebugConfigurationProviderTriggerKind): vscode.Disposable;
5656
registerDebugAdapterDescriptorFactory(extension: IExtensionDescription, type: string, factory: vscode.DebugAdapterDescriptorFactory): vscode.Disposable;
5757
registerDebugAdapterTrackerFactory(type: string, factory: vscode.DebugAdapterTrackerFactory): vscode.Disposable;
@@ -302,7 +302,7 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
302302
});
303303
}
304304

305-
public stopDebugging(session: vscode.DebugSession | undefined): Promise<void> {
305+
public stopDebugging(session?: vscode.DebugSession): Promise<void> {
306306
return this._debugServiceProxy.$stopDebugging(session ? session.id : undefined);
307307
}
308308

0 commit comments

Comments
 (0)