Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

debugger: Update debug panel when breakpoint store changes (#63240)

Casey Avila45cd77bba096
diff --git a/crates/debugger_ui/src/debugger_panel.rs b/crates/debugger_ui/src/debugger_panel.rs
index a55c07f5283..e980e0a7cc0 100644
--- a/crates/debugger_ui/src/debugger_panel.rs
+++ b/crates/debugger_ui/src/debugger_panel.rs
@@ -71,7 +71,7 @@ pub struct DebugPanel {
pub(crate) session_picker_menu_handle: PopoverMenuHandle<ContextMenu>,
fs: Arc<dyn Fs>,
is_zoomed: bool,
- _subscriptions: [Subscription; 1],
+ _subscriptions: [Subscription; 2],
breakpoint_list: Entity<BreakpointList>,
}
@@ -95,6 +95,11 @@ impl DebugPanel {
},
);
+ let breakpoint_subscription =
+ cx.observe(&project.read(cx).breakpoint_store(), |_, _, cx| {
+ cx.notify();
+ });
+
Self {
sessions_with_children: Default::default(),
active_session: None,
@@ -113,7 +118,7 @@ impl DebugPanel {
thread_picker_menu_handle,
session_picker_menu_handle,
is_zoomed: false,
- _subscriptions: [focus_subscription],
+ _subscriptions: [focus_subscription, breakpoint_subscription],
debug_scenario_scheduled_last: true,
}
})