diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index c3c4db40e4..0de1d83a65 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);