Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Serialize breakpoints when changing the state of a breakpoint (#27373)
Anthony Eid350c1e41d2f6
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex c3c4db40e4a..0de1d83a65d 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -65,7 +65,8 @@ use persistence::{};use postage::stream::Stream;use project::{- DirectoryLister, Project, ProjectEntryId, ProjectPath, ResolvedPath, Worktree, WorktreeId,+ debugger::breakpoint_store::BreakpointStoreEvent, DirectoryLister, Project, ProjectEntryId,+ ProjectPath, ResolvedPath, Worktree, WorktreeId,};use remote::{ssh_session::ConnectionIdentifier, SshClientDelegate, SshConnectionOptions};use schemars::JsonSchema;@@ -974,6 +975,17 @@ impl Workspace {}).detach();+ cx.subscribe_in(+ &project.read(cx).breakpoint_store(),+ window,+ |workspace, _, evt, window, cx| {+ if let BreakpointStoreEvent::BreakpointsUpdated(_, _) = evt {+ workspace.serialize_workspace(window, cx);+ }+ },+ )+ .detach();+cx.on_focus_lost(window, |this, window, cx| {let focus_handle = this.focus_handle(cx);window.focus(&focus_handle);