From cd2a827f63579579db1e478aebb4e9efb71f38e2 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 13 Aug 2020 18:42:38 +0200 Subject: [PATCH] breakpointEditorContribution: do not listen before a debug adapter is registered --- .../contrib/debug/browser/breakpointEditorContribution.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts b/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts index c2bbe5e9a35e..41b877f6723e 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts @@ -35,6 +35,7 @@ import { isSafari } from 'vs/base/browser/browser'; import { registerThemingParticipant, themeColorFromId } from 'vs/platform/theme/common/themeService'; import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { ILabelService } from 'vs/platform/label/common/label'; +import { debugAdapterRegisteredEmitter } from 'vs/workbench/contrib/debug/browser/debugConfigurationManager'; const $ = dom.$; @@ -167,8 +168,11 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi @ILabelService private readonly labelService: ILabelService ) { this.breakpointWidgetVisible = CONTEXT_BREAKPOINT_WIDGET_VISIBLE.bindTo(contextKeyService); - this.registerListeners(); this.setDecorationsScheduler = new RunOnceScheduler(() => this.setDecorations(), 30); + debugAdapterRegisteredEmitter.event(() => { + this.registerListeners(); + this.setDecorationsScheduler.schedule(); + }); } private registerListeners(): void {