mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-16 00:09:34 +01:00
Check save settings before debug restart (#154206)
* Fix bug: Files automatically saved when restarting debugger, even though it is set not to Fixes #149885
This commit is contained in:
@@ -223,6 +223,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
const folderUri = folder ? uri.revive(folder) : undefined;
|
||||
const launch = this.debugService.getConfigurationManager().getLaunch(folderUri);
|
||||
const parentSession = this.getSession(options.parentSessionID);
|
||||
const saveBeforeStart = typeof options.suppressSaveBeforeStart === 'boolean' ? !options.suppressSaveBeforeStart : undefined;
|
||||
const debugOptions: IDebugSessionOptions = {
|
||||
noDebug: options.noDebug,
|
||||
parentSession,
|
||||
@@ -230,11 +231,11 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
repl: options.repl,
|
||||
compact: options.compact,
|
||||
debugUI: options.debugUI,
|
||||
compoundRoot: parentSession?.compoundRoot
|
||||
compoundRoot: parentSession?.compoundRoot,
|
||||
saveBeforeStart: saveBeforeStart
|
||||
};
|
||||
try {
|
||||
const saveBeforeStart = typeof options.suppressSaveBeforeStart === 'boolean' ? !options.suppressSaveBeforeStart : undefined;
|
||||
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions, saveBeforeStart);
|
||||
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions);
|
||||
} catch (err) {
|
||||
throw new ErrorNoTelemetry(err && err.message ? err.message : 'cannot start debugging');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user