diff --git a/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx b/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx index 9e77860f020a5..efc5c5693b34a 100644 --- a/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx +++ b/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx @@ -161,8 +161,11 @@ export class DebugBreakpointWidget implements Disposable { } })); this.toDispose.push(this.zone.onDidLayoutChange(dimension => this.layout(dimension))); + this.toDispose.push(this.editor.getControl().onDidChangeModel(() => { + this.zone.hide(); + })); this.toDispose.push(input.getControl().onDidChangeModelContent(() => { - const heightInLines = input.getControl().getModel()?.getLineCount() || 0 + 1; + const heightInLines = (input.getControl().getModel()?.getLineCount() || 0) + 1; this.zone.layout(heightInLines); this.updatePlaceholder(); })); diff --git a/packages/debug/src/browser/editor/debug-editor-model.ts b/packages/debug/src/browser/editor/debug-editor-model.ts index f02848356836c..e79e73b42c1e4 100644 --- a/packages/debug/src/browser/editor/debug-editor-model.ts +++ b/packages/debug/src/browser/editor/debug-editor-model.ts @@ -132,6 +132,7 @@ export class DebugEditorModel implements Disposable { if (model) { this.toDisposeOnModelChange.push(model.onDidChangeDecorations(() => this.updateBreakpoints())); } + this.update(); this.render(); }