From 34a7cfb2e5e65969df3a70249ad20f9c020cbc6f Mon Sep 17 00:00:00 2001 From: mikeHag <36011050+mikeHag@users.noreply.github.com> Date: Thu, 13 Nov 2025 06:31:23 -0500 Subject: [PATCH] Update cargo.rs to allow debugging of integration test annotated with the ignore attribute (#42574) Address #40429 If an integration test is annotated with the ignore attribute, allow the "debug: Test" option of the debug scenario or Code Action to run with "--include-ignored" Closes #40429 Release Notes: - N/A --- crates/project/src/debugger/locators/cargo.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/project/src/debugger/locators/cargo.rs b/crates/project/src/debugger/locators/cargo.rs index 662b9ca7efcd53b8792127e531a9baba24967ea1..72aafff51609c8e55ac15f671a7b7f553b34d44f 100644 --- a/crates/project/src/debugger/locators/cargo.rs +++ b/crates/project/src/debugger/locators/cargo.rs @@ -148,6 +148,8 @@ impl DapLocator for CargoLocator { .first() .is_some_and(|arg| arg == "test" || arg == "t"); + let is_ignored = build_config.args.contains(&"--include-ignored".to_owned()); + let executables = output .lines() .filter(|line| !line.trim().is_empty()) @@ -205,6 +207,9 @@ impl DapLocator for CargoLocator { let mut args: Vec<_> = test_name.into_iter().collect(); if is_test { args.push("--nocapture".to_owned()); + if is_ignored { + args.push("--include-ignored".to_owned()); + } } Ok(DebugRequest::Launch(task::LaunchRequest {