debugger: Add debug task picker to new session modal (#29702)
## Preview  ### TODO - [x] Add scenario picker to new session modal - [x] Make debugger start action open new session modal instead of task modal - [x] Fix `esc` not clearing the cancelling the new session modal while it's in scenario or attach mode - [x] Resolve debug scenario's correctly Release Notes: - N/A
This commit is contained in:
parent
ba59305510
commit
f619d5f02a
9 changed files with 607 additions and 180 deletions
|
@ -19,7 +19,8 @@ pub use debug_format::{
|
|||
AttachRequest, DebugRequest, DebugScenario, DebugTaskFile, LaunchRequest, TcpArgumentsTemplate,
|
||||
};
|
||||
pub use task_template::{
|
||||
DebugArgsRequest, HideStrategy, RevealStrategy, TaskModal, TaskTemplate, TaskTemplates,
|
||||
DebugArgsRequest, HideStrategy, RevealStrategy, TaskTemplate, TaskTemplates,
|
||||
substitute_all_template_variables_in_str,
|
||||
};
|
||||
pub use vscode_debug_format::VsCodeDebugTaskFile;
|
||||
pub use vscode_format::VsCodeTaskFile;
|
||||
|
@ -266,6 +267,10 @@ impl TaskVariables {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> impl Iterator<Item = (&VariableName, &String)> {
|
||||
self.0.iter()
|
||||
}
|
||||
}
|
||||
|
||||
impl FromIterator<(VariableName, String)> for TaskVariables {
|
||||
|
|
|
@ -83,15 +83,6 @@ pub enum DebugArgsRequest {
|
|||
Attach(AttachRequest),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
/// The type of task modal to spawn
|
||||
pub enum TaskModal {
|
||||
/// Show regular tasks
|
||||
ScriptModal,
|
||||
/// Show debug tasks
|
||||
DebugModal,
|
||||
}
|
||||
|
||||
/// What to do with the terminal pane and tab, after the command was started.
|
||||
#[derive(Default, Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
|
@ -302,7 +293,7 @@ fn to_hex_hash(object: impl Serialize) -> anyhow::Result<String> {
|
|||
Ok(hex::encode(hasher.finalize()))
|
||||
}
|
||||
|
||||
fn substitute_all_template_variables_in_str<A: AsRef<str>>(
|
||||
pub fn substitute_all_template_variables_in_str<A: AsRef<str>>(
|
||||
template_str: &str,
|
||||
task_variables: &HashMap<String, A>,
|
||||
variable_names: &HashMap<String, VariableName>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue