Skip to content

Commit

Permalink
Fix #12546: UI not updated upon editing breakpoint condition (#12980)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pisv authored Nov 3, 2023
1 parent dcfff83 commit aab4102
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/debug/src/browser/breakpoint/breakpoint-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
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);
}
}
Expand Down

0 comments on commit aab4102

Please sign in to comment.