debugger: Debug sessions rerun build tasks by default when restarting (#33724)
We reworked the debug modal spawning to use the task context from past debug sessions when spawning a debug scenario based on task inventory history. We changed restart session keybinding to rerun session too. Closes #31369 Release Notes: - Restarting a debug session now reruns build tasks that are associated with the session --------- Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
parent
6b06685723
commit
0e2e5b8b0d
13 changed files with 213 additions and 82 deletions
|
@ -3,7 +3,7 @@ use std::process::ExitStatus;
|
|||
use anyhow::Result;
|
||||
use gpui::{AppContext, Context, Entity, Task};
|
||||
use language::Buffer;
|
||||
use project::TaskSourceKind;
|
||||
use project::{TaskSourceKind, WorktreeId};
|
||||
use remote::ConnectionState;
|
||||
use task::{DebugScenario, ResolvedTask, SpawnInTerminal, TaskContext, TaskTemplate};
|
||||
use ui::Window;
|
||||
|
@ -95,11 +95,19 @@ impl Workspace {
|
|||
scenario: DebugScenario,
|
||||
task_context: TaskContext,
|
||||
active_buffer: Option<Entity<Buffer>>,
|
||||
worktree_id: Option<WorktreeId>,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
if let Some(provider) = self.debugger_provider.as_mut() {
|
||||
provider.start_session(scenario, task_context, active_buffer, window, cx)
|
||||
provider.start_session(
|
||||
scenario,
|
||||
task_context,
|
||||
active_buffer,
|
||||
worktree_id,
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,6 +146,7 @@ pub trait DebuggerProvider {
|
|||
definition: DebugScenario,
|
||||
task_context: TaskContext,
|
||||
active_buffer: Option<Entity<Buffer>>,
|
||||
worktree_id: Option<WorktreeId>,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue