From cb523fc88a35731279925a418dd6828df6acde92 Mon Sep 17 00:00:00 2001 From: Andrei Listochkin Date: Tue, 25 Jun 2024 18:13:08 +0100 Subject: [PATCH] pass cargo extra args when debug fixes #17128 --- editors/code/src/debug.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts index 58fe1df51f..c2da2ea4e3 100644 --- a/editors/code/src/debug.ts +++ b/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, ): Promise { 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;