about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-01 10:34:09 +0000
committerbors <bors@rust-lang.org>2024-07-01 10:34:09 +0000
commit94e5efdab1594acb195cf9f44b520de24f37041b (patch)
treed000dd08ee374680aa248239127ab33a1c901975 /src/tools/rust-analyzer/editors/code
parent29fbc2414d63e985a0fb1547489bf2fb3b093a78 (diff)
parentb906d4100d46872491f429ae39f83b2914c6b6ce (diff)
downloadrust-94e5efdab1594acb195cf9f44b520de24f37041b.tar.gz
rust-94e5efdab1594acb195cf9f44b520de24f37041b.zip
Auto merge of #17495 - listochkin:pass-cargo-extra-args-for-debugger, r=Veykril
pass cargo extra args when debugging

fixes #17128
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
-rw-r--r--src/tools/rust-analyzer/editors/code/src/debug.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/editors/code/src/debug.ts b/src/tools/rust-analyzer/editors/code/src/debug.ts
index 58fe1df51f4..c2da2ea4e3b 100644
--- a/src/tools/rust-analyzer/editors/code/src/debug.ts
+++ b/src/tools/rust-analyzer/editors/code/src/debug.ts
@@ -5,7 +5,7 @@ import type * as ra from "./lsp_ext";
 
 import { Cargo, getRustcId, getSysroot } from "./toolchain";
 import type { Ctx } from "./ctx";
-import { prepareEnv } from "./run";
+import { createCargoArgs, prepareEnv } from "./run";
 import { isCargoRunnableArgs, unwrapUndefinable } from "./util";
 
 const debugOutput = vscode.window.createOutputChannel("Debug");
@@ -180,7 +180,8 @@ async function getDebugExecutable(
     env: Record<string, string>,
 ): Promise<string> {
     const cargo = new Cargo(runnableArgs.workspaceRoot || ".", debugOutput, env);
-    const executable = await cargo.executableFromArgs(runnableArgs.cargoArgs);
+    const args = createCargoArgs(runnableArgs);
+    const executable = await cargo.executableFromArgs(args);
 
     // if we are here, there were no compilation errors.
     return executable;