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:
parent
092be31b2b
commit
03071a9152
5 changed files with 58 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue