debugger: Add an action to rerun the last session (#31442)
This works the same as selecting the first history match in the new session modal. Release Notes: - Debugger Beta: Added the `debugger: rerun last session` action, bound by default to `alt-f4`.
This commit is contained in:
@@ -47,6 +47,7 @@ actions!(
|
||||
ShowStackTrace,
|
||||
ToggleThreadPicker,
|
||||
ToggleSessionPicker,
|
||||
RerunLastSession,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -208,7 +209,18 @@ pub fn init(cx: &mut App) {
|
||||
)
|
||||
.register_action(|workspace: &mut Workspace, _: &Start, window, cx| {
|
||||
NewSessionModal::show(workspace, window, cx);
|
||||
});
|
||||
})
|
||||
.register_action(
|
||||
|workspace: &mut Workspace, _: &RerunLastSession, window, cx| {
|
||||
let Some(debug_panel) = workspace.panel::<DebugPanel>(cx) else {
|
||||
return;
|
||||
};
|
||||
|
||||
debug_panel.update(cx, |debug_panel, cx| {
|
||||
debug_panel.rerun_last_session(workspace, window, cx);
|
||||
})
|
||||
},
|
||||
);
|
||||
})
|
||||
})
|
||||
.detach();
|
||||
|
||||
Reference in New Issue
Block a user