mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-24 00:05:46 +01:00
Add DebugSessionOptions suppressSaveBeforeStart
See microsoft/vscode-jupyter#6898
This commit is contained in:
Vendored
+5
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user