diff options
| author | Andrei Listochkin <andrei.listochkin@ferrous-systems.com> | 2024-06-25 18:13:08 +0100 |
|---|---|---|
| committer | Andrei Listochkin <andrei.listochkin@ferrous-systems.com> | 2024-06-25 18:13:08 +0100 |
| commit | b906d4100d46872491f429ae39f83b2914c6b6ce (patch) | |
| tree | 6308c52729a04a801c321649add1b001ce57d1eb | |
| parent | 2445d537e6aae2755c1eadd5dda8cca079d9100d (diff) | |
| download | rust-b906d4100d46872491f429ae39f83b2914c6b6ce.tar.gz rust-b906d4100d46872491f429ae39f83b2914c6b6ce.zip | |
pass cargo extra args when debug
fixes #17128
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/src/debug.ts | 5 |
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; |
