Finalize notebookDebugOptions API (#163316)

* Finalize notebookDebugOptions API
Fix #147264

* Backcompat for the option from vscode-jupyter

* Undo comment

* Fix build
This commit is contained in:
Rob Lourens
2022-10-11 20:25:51 -07:00
committed by GitHub
parent fdb8812822
commit cf47b76c63
15 changed files with 77 additions and 63 deletions

View File

@@ -230,9 +230,12 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
lifecycleManagedByParent: options.lifecycleManagedByParent,
repl: options.repl,
compact: options.compact,
debugUI: options.debugUI,
compoundRoot: parentSession?.compoundRoot,
saveBeforeRestart: saveBeforeStart
saveBeforeRestart: saveBeforeStart,
suppressDebugStatusbar: options.suppressDebugStatusbar,
suppressDebugToolbar: options.suppressDebugToolbar,
suppressDebugView: options.suppressDebugView,
};
try {
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions, saveBeforeStart);

View File

@@ -1226,9 +1226,9 @@ export interface IStartDebuggingOptions {
repl?: IDebugSessionReplMode;
noDebug?: boolean;
compact?: boolean;
debugUI?: {
simple?: boolean;
};
suppressDebugToolbar?: boolean;
suppressDebugStatusbar?: boolean;
suppressDebugView?: boolean;
suppressSaveBeforeStart?: boolean;
}

View File

@@ -285,8 +285,12 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
repl: options.consoleMode === DebugConsoleMode.MergeWithParent ? 'mergeWithParent' : 'separate',
noDebug: options.noDebug,
compact: options.compact,
debugUI: options.debugUI,
suppressSaveBeforeStart: options.suppressSaveBeforeStart
suppressSaveBeforeStart: options.suppressSaveBeforeStart,
// Check debugUI for back-compat, #147264
suppressDebugStatusbar: options.suppressDebugStatusbar ?? (options as any).debugUI?.simple,
suppressDebugToolbar: options.suppressDebugToolbar ?? (options as any).debugUI?.simple,
suppressDebugView: options.suppressDebugView ?? (options as any).debugUI?.simple,
});
}