Allow enabling/disabling breakpoints (#27280)

This PR adds the ability to enable/disable breakpoints. It also fixes a
bug where toggling a log breakpoint from the breakpoint context menu
would add a standard breakpoint on top of the log breakpoint instead of
deleting it.

todo: 
- [x] Add `BreakpointState` field Breakpoint that manages if a
breakpoint is active or not
- [x] Don't send disabled breakpoints to DAP servers - in progress
- [x] Half the opacity of disabled breakpoints - in progress
- [x] Add `BreakpointState` to database
- [x] Editor test for enabling/disabling breakpoints
- [ ] Integration Test to make sure we don't send disabled breakpoints
to DAP servers
- [x] Database test to make sure we properly serialize/deserialize
BreakpointState

Release Notes:

- N/A

---------

Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
Anthony Eid 2025-03-26 02:06:08 -04:00 committed by GitHub
parent df583d73b9
commit d70ac64fe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 583 additions and 172 deletions

View file

@ -2640,9 +2640,15 @@ enum BreakpointKind {
Log = 1;
}
enum BreakpointState {
Enabled = 0;
Disabled = 1;
}
message Breakpoint {
Anchor position = 1;
BreakpointState state = 2;
BreakpointKind kind = 3;
optional string message = 4;
}