Skip to content

Commit

Permalink
Resolve issue #5102: Support input variables for envFile (#5189)
Browse files Browse the repository at this point in the history
This fixes #5102
  • Loading branch information
karolz-ms authored Apr 27, 2022
1 parent 1d477d2 commit 7b1f541
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/configurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class CSharpConfigurationProvider implements vscode.DebugConfigurationPro
/**
* Try to add all missing attributes to the debug configuration being launched.
*/
resolveDebugConfiguration(folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.ProviderResult<vscode.DebugConfiguration> {
resolveDebugConfigurationWithSubstitutedVariables(folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.ProviderResult<vscode.DebugConfiguration> {

if (!config.type) {
// If the config doesn't look functional force VSCode to open a configuration file https://github.com/Microsoft/vscode/issues/54213
Expand All @@ -155,15 +155,15 @@ export class CSharpConfigurationProvider implements vscode.DebugConfigurationPro

if (config.request === "launch") {
if (!config.cwd && !config.pipeTransport) {
config.cwd = "${workspaceFolder}";
config.cwd = folder?.uri?.fsPath; // Workspace folder
}
if (!config.internalConsoleOptions) {
config.internalConsoleOptions = "openOnSessionStart";
}

// read from envFile and set config.env
if (config.envFile) {
config = this.parseEnvFile(config.envFile.replace(/\${workspaceFolder}/g, folder.uri.fsPath), config);
config = this.parseEnvFile(config.envFile, config);
}
}

Expand Down

0 comments on commit 7b1f541

Please sign in to comment.