From 5964e6c3a89dccd689b16b4b9e0fd9eb613415d4 Mon Sep 17 00:00:00 2001 From: Vladimir Piskarev Date: Sun, 8 Oct 2023 17:50:42 +0300 Subject: [PATCH] Fix #12546: UI not updated upon editing breakpoint condition Fixes #12546, which is a regression introduced by #12183, by ensuring that `BreakpointManager.setMarkers` fires a `SourceBreakpointsChangeEvent` when `oldMarker === newMarker`, as there is no way to actually detect a change in this case. --- packages/debug/src/browser/breakpoint/breakpoint-manager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/debug/src/browser/breakpoint/breakpoint-manager.ts b/packages/debug/src/browser/breakpoint/breakpoint-manager.ts index 13f4de067298a..8c8eef44b8d88 100644 --- a/packages/debug/src/browser/breakpoint/breakpoint-manager.ts +++ b/packages/debug/src/browser/breakpoint/breakpoint-manager.ts @@ -75,7 +75,9 @@ export class BreakpointManager extends MarkerManager { added.push(newMarker); } else { // We emit all existing markers as 'changed', but we only fire an event if something really did change. - didChangeMarkers ||= !!added.length || !deepEqual(oldMarker, newMarker); + // We also fire an event if oldMarker === newMarker, as we cannot actually detect a change in this case + // (https://github.com/eclipse-theia/theia/issues/12546). + didChangeMarkers ||= !!added.length || oldMarker === newMarker || !deepEqual(oldMarker, newMarker); changed.push(newMarker); } }