From c48062fe2ab9a2d913d1985a6b0aec4bf936bfc1 Mon Sep 17 00:00:00 2001 From: Laurențiu Nicola Date: Mon, 5 Jun 2023 12:04:23 +0300 Subject: Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra --- editors/code/src/debug.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'editors/code/src/debug.ts') diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts index 268b70b4fbb..cffee1de6af 100644 --- a/editors/code/src/debug.ts +++ b/editors/code/src/debug.ts @@ -118,8 +118,8 @@ async function getDebugConfiguration( return path.normalize(p).replace(wsFolder, "${workspaceFolder" + workspaceQualifier + "}"); } - const executable = await getDebugExecutable(runnable); const env = prepareEnv(runnable, ctx.config.runnableEnv); + const executable = await getDebugExecutable(runnable, env); let sourceFileMap = debugOptions.sourceFileMap; if (sourceFileMap === "auto") { // let's try to use the default toolchain @@ -156,8 +156,11 @@ async function getDebugConfiguration( return debugConfig; } -async function getDebugExecutable(runnable: ra.Runnable): Promise { - const cargo = new Cargo(runnable.args.workspaceRoot || ".", debugOutput); +async function getDebugExecutable( + runnable: ra.Runnable, + env: Record +): Promise { + const cargo = new Cargo(runnable.args.workspaceRoot || ".", debugOutput, env); const executable = await cargo.executableFromArgs(runnable.args.cargoArgs); // if we are here, there were no compilation errors. -- cgit 1.4.1-3-g733a5