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: Add missing StepOut handler (#31463)

Cole Miller092be31b2b4a
diff --git a/crates/debugger_ui/src/debugger_ui.rs b/crates/debugger_ui/src/debugger_ui.rs
index 2cb38d31882..a317df4147c 100644
--- a/crates/debugger_ui/src/debugger_ui.rs
+++ b/crates/debugger_ui/src/debugger_ui.rs
@@ -119,6 +119,17 @@ pub fn init(cx: &mut App) {
}
}
})
+ .register_action(|workspace, _: &StepOut, _, cx| {
+ if let Some(debug_panel) = workspace.panel::<DebugPanel>(cx) {
+ if let Some(active_item) = debug_panel.read_with(cx, |panel, cx| {
+ panel
+ .active_session()
+ .map(|session| session.read(cx).running_state().clone())
+ }) {
+ active_item.update(cx, |item, cx| item.step_out(cx))
+ }
+ }
+ })
.register_action(|workspace, _: &StepBack, _, cx| {
if let Some(debug_panel) = workspace.panel::<DebugPanel>(cx) {
if let Some(active_item) = debug_panel