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 18:20:03 +00:00
committed by GitHub
parent 92b9bc599d
commit d360f77796
3 changed files with 88 additions and 3 deletions
+6 -2
View File
@@ -41,7 +41,9 @@ async fn test_direct_attach_to_process(executor: BackgroundExecutor, cx: &mut Te
},
|client| {
client.on_request::<dap::requests::Attach, _>(move |_, args| {
assert_eq!(json!({"request": "attach", "process_id": 10}), args.raw);
let raw = &args.raw;
assert_eq!(raw["request"], "attach");
assert_eq!(raw["process_id"], 10);
Ok(())
});
@@ -91,7 +93,9 @@ async fn test_show_attach_modal_and_select_process(
let _initialize_subscription =
project::debugger::test::intercept_debug_sessions(cx, |client| {
client.on_request::<dap::requests::Attach, _>(move |_, args| {
assert_eq!(json!({"request": "attach", "process_id": 1}), args.raw);
let raw = &args.raw;
assert_eq!(raw["request"], "attach");
assert_eq!(raw["process_id"], 1);
Ok(())
});