diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-05 11:07:47 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-05 11:07:47 +0300 |
| commit | c3dbe7c7176963509612012df321334227ba4299 (patch) | |
| tree | fdf653c880c21dfeea5f9f56e1749951cab8ca39 /editors/code/src/debug.ts | |
| parent | 1570299af4df53aacd6d68cf1b24aee734e9cdcd (diff) | |
| parent | c6a3fe051a7c4284821c12ffe922087fb8662f2b (diff) | |
| download | rust-c3dbe7c7176963509612012df321334227ba4299.tar.gz rust-c3dbe7c7176963509612012df321334227ba4299.zip | |
Merge remote-tracking branch 'upstream/master' into sync-from-rust
Diffstat (limited to 'editors/code/src/debug.ts')
| -rw-r--r-- | editors/code/src/debug.ts | 9 |
1 files changed, 6 insertions, 3 deletions
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<string> { - const cargo = new Cargo(runnable.args.workspaceRoot || ".", debugOutput); +async function getDebugExecutable( + runnable: ra.Runnable, + env: Record<string, string> +): Promise<string> { + 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. |
