debugger: Fix bug where active debug line highlights weren't cleared (#29562)

## Context
The bug occurred because we stopped propagating the
`BreakpointStoreEvent::SetDebugLine` whenever a new debug line highlight
had been set. This was done to prevent multiple panes from having
editors focus on the debug line. However, it stopped the event from
propagating to editors that needed to clear their debug line highlights.

I fixed this by introducing two phases
1. Clear all debug line highlights
2. Set active debug line highlight in singular editor 

I also added a test to prevent regressions from occurring

Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-04-29 11:15:45 -04:00 committed by GitHub
parent c168fc335c
commit 6386336eee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 292 additions and 15 deletions

View file

@ -998,7 +998,7 @@ impl Workspace {
| BreakpointStoreEvent::BreakpointsCleared(_) => {
workspace.serialize_workspace(window, cx);
}
BreakpointStoreEvent::ActiveDebugLineChanged => {}
BreakpointStoreEvent::SetDebugLine | BreakpointStoreEvent::ClearDebugLines => {}
},
)
.detach();