Skip to content

Commit 94e5efd

Browse files
committed
Auto merge of rust-lang#17495 - listochkin:pass-cargo-extra-args-for-debugger, r=Veykril
pass cargo extra args when debugging fixes rust-lang#17128
2 parents 29fbc24 + b906d41 commit 94e5efd

File tree

1 file changed

+3
-2
lines changed
  • src/tools/rust-analyzer/editors/code/src

1 file changed

+3
-2
lines changed

src/tools/rust-analyzer/editors/code/src/debug.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type * as ra from "./lsp_ext";
55

66
import { Cargo, getRustcId, getSysroot } from "./toolchain";
77
import type { Ctx } from "./ctx";
8-
import { prepareEnv } from "./run";
8+
import { createCargoArgs, prepareEnv } from "./run";
99
import { isCargoRunnableArgs, unwrapUndefinable } from "./util";
1010

1111
const debugOutput = vscode.window.createOutputChannel("Debug");
@@ -180,7 +180,8 @@ async function getDebugExecutable(
180180
env: Record<string, string>,
181181
): Promise<string> {
182182
const cargo = new Cargo(runnableArgs.workspaceRoot || ".", debugOutput, env);
183-
const executable = await cargo.executableFromArgs(runnableArgs.cargoArgs);
183+
const args = createCargoArgs(runnableArgs);
184+
const executable = await cargo.executableFromArgs(args);
184185

185186
// if we are here, there were no compilation errors.
186187
return executable;

0 commit comments

Comments
 (0)