Skip to content

Commit e6fd485

Browse files
committed
Auto merge of #17495 - listochkin:pass-cargo-extra-args-for-debugger, r=Veykril
pass cargo extra args when debugging fixes #17128
2 parents becf5d3 + cb523fc commit e6fd485

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)