Add DebugSessionOptions suppressSaveBeforeStart

See microsoft/vscode-jupyter#6898
This commit is contained in:
Rob Lourens
2021-09-02 11:05:13 -07:00
parent a6e25d3604
commit cdc8e53cf3
4 changed files with 9 additions and 2 deletions
+5
View File
@@ -729,6 +729,11 @@ declare module 'vscode' {
*/
simple?: boolean;
}
/**
* When true, a save will not be triggered for open editors when starting a debug session, regardless of the value of the `debug.saveBeforeStart` setting.
*/
suppressSaveBeforeStart?: boolean;
}
//#endregion
@@ -232,7 +232,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
debugUI: options.debugUI,
compoundRoot: parentSession?.compoundRoot
};
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions).then(success => {
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions, !options.suppressSaveBeforeStart).then(success => {
return success;
}, err => {
return Promise.reject(new Error(err && err.message ? err.message : 'cannot start debugging'));
@@ -1114,6 +1114,7 @@ export interface IStartDebuggingOptions {
debugUI?: {
simple?: boolean;
};
suppressSaveBeforeStart?: boolean;
}
export interface MainThreadDebugServiceShape extends IDisposable {
@@ -293,7 +293,8 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
repl: options.consoleMode === DebugConsoleMode.MergeWithParent ? 'mergeWithParent' : 'separate',
noDebug: options.noDebug,
compact: options.compact,
debugUI: options.debugUI
debugUI: options.debugUI,
suppressSaveBeforeStart: options.suppressSaveBeforeStart
});
}