debugger: Add args argument to debugger launch config (#27953)

This also fixes a bug where debug cargo test code actions would debug
all tests in a mod instead of a specific test

Release Notes:

- N/A
This commit is contained in:
Anthony Eid
2025-04-02 15:37:12 -04:00
committed by GitHub
parent 500964a6fa
commit 108ae0b5b0
15 changed files with 42 additions and 17 deletions
+2 -7
View File
@@ -52,6 +52,8 @@ pub struct LaunchConfig {
pub program: String,
/// The current working directory of your project
pub cwd: Option<PathBuf>,
/// Args to pass to a debuggee
pub args: Vec<String>,
}
/// Represents the type that will determine which request to call on the debug adapter
@@ -104,8 +106,6 @@ pub struct DebugAdapterConfig {
pub tcp_connection: Option<TCPHost>,
/// What Locator to use to configure the debug task
pub locator: Option<String>,
/// Args to pass to a debug adapter (only used in locator right now)
pub args: Vec<String>,
/// Whether to tell the debug adapter to stop on entry
pub stop_on_entry: Option<bool>,
}
@@ -119,7 +119,6 @@ impl From<DebugTaskDefinition> for DebugAdapterConfig {
initialize_args: def.initialize_args,
tcp_connection: def.tcp_connection,
locator: def.locator,
args: def.args,
stop_on_entry: def.stop_on_entry,
}
}
@@ -140,7 +139,6 @@ impl TryFrom<DebugAdapterConfig> for DebugTaskDefinition {
initialize_args: def.initialize_args,
tcp_connection: def.tcp_connection,
locator: def.locator,
args: def.args,
stop_on_entry: def.stop_on_entry,
})
}
@@ -217,9 +215,6 @@ pub struct DebugTaskDefinition {
/// Locator to use
/// -- cargo
pub locator: Option<String>,
/// Args to pass to a debug adapter (only used in locator right now)
#[serde(skip)]
pub args: Vec<String>,
/// Whether to tell the debug adapter to stop on entry
pub stop_on_entry: Option<bool>,
}