debugger: Fix bug where args from debug config weren't sent to adapters (#29445)

I added some tests to ensure that this regression doesn't happen again.
This also fixes the cargo test locators, debugging all tests in a module
instead of just the singular test a user selects.

Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-04-28 14:20:03 -04:00 committed by GitHub
parent 92b9bc599d
commit d360f77796
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 88 additions and 3 deletions

View file

@ -121,6 +121,10 @@ impl TcpArguments {
/// an optional build step is completed, we turn it's result into a DebugTaskDefinition by running a locator (or using a user-provided task) and resolving task variables.
/// Finally, a [DebugTaskDefinition] has to be turned into a concrete debugger invocation ([DebugAdapterBinary]).
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(
any(feature = "test-support", test),
derive(serde::Deserialize, serde::Serialize)
)]
pub struct DebugTaskDefinition {
pub label: SharedString,
pub adapter: SharedString,
@ -524,6 +528,7 @@ impl FakeAdapter {
} else {
None
},
"raw_request": serde_json::to_value(config).unwrap()
});
let request = match config.request {
DebugRequest::Launch(_) => dap_types::StartDebuggingRequestArgumentsRequest::Launch,