diff --git a/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts b/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts index f3e32f051f075b7529fdbfe1edce539fbca9c0c0..b86af843fa8c8ada0a95d558cb9989136fb3c5d7 100644 --- a/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts +++ b/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts @@ -28,10 +28,8 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import Severity from 'vs/base/common/severity'; import { TaskDefinitionRegistry } from 'vs/workbench/contrib/tasks/common/taskDefinitionRegistry'; -import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; const jsonRegistry = Registry.as(JSONExtensions.JSONContribution); -const DEBUGGERS_AVAILABLE_KEY = 'debug.debuggersavailable'; export class AdapterManager implements IAdapterManager { @@ -53,14 +51,11 @@ export class AdapterManager implements IAdapterManager { @IContextKeyService contextKeyService: IContextKeyService, @IModeService private readonly modeService: IModeService, @IDialogService private readonly dialogService: IDialogService, - @IStorageService private readonly storageService: IStorageService ) { this.adapterDescriptorFactories = []; this.debuggers = []; this.registerListeners(); - const debuggersAvailable = this.storageService.getBoolean(DEBUGGERS_AVAILABLE_KEY, StorageScope.WORKSPACE, false); this.debuggersAvailable = CONTEXT_DEBUGGERS_AVAILABLE.bindTo(contextKeyService); - this.debuggersAvailable.set(debuggersAvailable); } private registerListeners(): void { @@ -164,7 +159,6 @@ export class AdapterManager implements IAdapterManager { registerDebugAdapterFactory(debugTypes: string[], debugAdapterLauncher: IDebugAdapterFactory): IDisposable { debugTypes.forEach(debugType => this.debugAdapterFactories.set(debugType, debugAdapterLauncher)); this.debuggersAvailable.set(this.debugAdapterFactories.size > 0); - this.storageService.store(DEBUGGERS_AVAILABLE_KEY, this.debugAdapterFactories.size > 0, StorageScope.WORKSPACE, StorageTarget.MACHINE); this._onDidRegisterDebugger.fire(); return { diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index a7ee54b1142cf160e41cd9260eb9b062d6130c29..6638f97ea6e6a7a6e540897a583e85632905e1dc 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -137,6 +137,8 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { this.multiSessionRepl = CONTEXT_MULTI_SESSION_REPL.bindTo(contextKeyService); codeEditorService.registerDecorationType('repl-decoration', DECORATION_KEY, {}); + this.multiSessionRepl.set(this.isMultiSessionView); + this.registerListeners(); } private registerListeners(): void { @@ -541,9 +543,6 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { protected override renderBody(parent: HTMLElement): void { super.renderBody(parent); this.container = dom.append(parent, $('.repl')); - // Only depend on debug service in renderBody not in constructor to no have cyclic dependency - this.multiSessionRepl.set(this.isMultiSessionView); - this.registerListeners(); this.treeContainer = dom.append(this.container, $(`.repl-tree.${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)); this.createReplInput(this.container); this.createReplTree();