Change:
The debug viewlet breaks and does not load when the window is loaded with that viewlet visible Reload window with debug viewlet visible DebugActionViewItem is created, requires DebugService DebugService is instantiated, sets some context keys The context keys cause the debug view to refresh, the toolbar in the view header wants to refresh its actions, this leads to creating DebugActionViewItem again DebugService is not done being instantiated, so we try to instantiate a second one Repeat The context keys maybe should not be owned by the service, but could be a separate contribution
I think this was technically caused by , causing the DebugService to be created a little later than it was before. FYI My PR makes it happen a little more often, since otherwise the editor contribs might cause DebugService to be instantiated early, but I can repro this without my PR. I think the context keys can live in a separate workbench contrib that depends on DebugService, and listens to its events to update the keys.
The stack
That or don't set them from within the ctor but after your object/services is initialized (and cached)

Discussion:
this.disposables.add(this.configurationManager); this.debugStorage = this.instantiationService.createInstance(DebugStorage); <del> contextKeyService.bufferChangeEvents(() => { this.debugType = CONTEXT_DEBUG_TYPE.bindTo(contextKeyService); this.debugState = CONTEXT_DEBUG_STATE.bindTo(contextKeyService); this.inDebugMode = CONTEXT_IN_DEBUG_MODE.bindTo(contextKeyService); this.debugUx = CONTEXT_DEBUG_UX.bindTo(contextKeyService); this.debugUx.set(this.debugStorage.loadDebugUxState()); this.breakpointsExist = CONTEXT_BREAKPOINTS_EXIST.bindTo(contextKeyService); // Need to set disassemblyViewFocus here to make it in the same context as the debug event handlers this.disassemblyViewFocus = CONTEXT_DISASSEMBLY_VIEW_FOCUS.bindTo(contextKeyService); }); </del> this.chosenEnvironments = this.debugStorage.loadChosenEnvironments(); this.model = this.instantiationService.createInstance(DebugModel, this.debugStorage); this.telemetry = this.instantiationService.createInstance(DebugTelemetry, this.model); <del> const setBreakpointsExistContext = () => this.breakpointsExist.set(!!(this.model.getBreakpoints().length || this.model.getDataBreakpoints().length || this.model.getFunctionBreakpoints().length)); setBreakpointsExistContext(); </del> this.viewModel = new ViewModel(contextKeyService); this.taskRunner = this.instantiationService.createInstance(DebugTaskRunner);

} } })); <del> this.disposables.add(this.model.onDidChangeBreakpoints(() => setBreakpointsExistContext())); </del> this.disposables.add(editorService.onDidActiveEditorChange(() => { this.contextKeyService.bufferChangeEvents(() => {

} } })); <ins> this.initContextKeys(contextKeyService); } private initContextKeys(contextKeyService: IContextKeyService): void { queueMicrotask(() => { contextKeyService.bufferChangeEvents(() => { this.debugType = CONTEXT_DEBUG_TYPE.bindTo(contextKeyService); this.debugState = CONTEXT_DEBUG_STATE.bindTo(contextKeyService); this.inDebugMode = CONTEXT_IN_DEBUG_MODE.bindTo(contextKeyService); this.debugUx = CONTEXT_DEBUG_UX.bindTo(contextKeyService); this.debugUx.set(this.debugStorage.loadDebugUxState()); this.breakpointsExist = CONTEXT_BREAKPOINTS_EXIST.bindTo(contextKeyService); // Need to set disassemblyViewFocus here to make it in the same context as the debug event handlers this.disassemblyViewFocus = CONTEXT_DISASSEMBLY_VIEW_FOCUS.bindTo(contextKeyService); }); const setBreakpointsExistContext = () => this.breakpointsExist.set(!!(this.model.getBreakpoints().length || this.model.getDataBreakpoints().length || this.model.getFunctionBreakpoints().length)); setBreakpointsExistContext(); this.disposables.add(this.model.onDidChangeBreakpoints(() => setBreakpointsExistContext())); }); </ins> } getModel(): IDebugModel {