Fix debug configuration querying not inheriting environment

This commit is contained in:
Lukas Wirth 2024-12-02 12:58:43 +01:00
parent b65911d5ee
commit d75f996722
4 changed files with 42 additions and 154 deletions

View file

@ -148,8 +148,16 @@ async function getDebugConfiguration(
return path.normalize(p).replace(wsFolder, `\${workspaceFolder${workspaceQualifier}}`);
}
const env = prepareEnv(inheritEnv, runnable.label, runnableArgs, config.runnablesExtraEnv);
const executable = await getDebugExecutable(runnableArgs, env);
const executable = await getDebugExecutable(
runnableArgs,
prepareEnv(true, {}, config.runnablesExtraEnv(runnable.label)),
);
const env = prepareEnv(
inheritEnv,
runnableArgs.environment,
config.runnablesExtraEnv(runnable.label),
);
let sourceFileMap = debugOptions.sourceFileMap;
if (sourceFileMap === "auto") {