coreclr debug configuration should support input variables for `envFile`
See original GitHub issueVS Code has a mechanism called “input variables” where debug configuration values can be resolved by running arbitrary commands, picking an item from predefined list, or prompting the user: https://code.visualstudio.com/docs/editor/variables-reference#_input-variables
Node.js and Python debug configuration providers support this mechanism. Unfortunately, coreclr
seems to lack this support.
Repro steps
- Create a debug configuration that uses an input variable, for example
{
"configurations": [
{
"name": "Debug API",
"type": "coreclr",
"request": "launch",
// other properties as necessary
"envFile": "${input:getPathToFile}"
}
],
"inputs": [
{
"id": "getPathToFile",
"type": "promptString"
// The really interesting/important case is type==command.
// promptString is used just to simplify the repro
}
]
}
- Try using the configuration
Expected result
Should prompt the user for the path to the .env
file
Actual result
Can't parse envFile ${input:getPathToFile} because of Error: ENOENT: no such file or directory, open '${input:getPathToFile}'
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Variables reference - Visual Studio Code
Variables Reference. Visual Studio Code supports variable substitution in Debugging and Task configuration files as well as some select settings.
Read more >omnisharp-vscode - Discover .NET
Official C# support for Visual Studio Code (powered by OmniSharp) ... coreclr debug configuration should support input variables for envFile (#5102, ...
Read more >Debugging profiling config settings - .NET - Microsoft Learn
This article details the settings you can use to configure .NET debugging and profiling. Note .NET 6 standardizes on the prefix DOTNET_ instead ......
Read more >C# – Open VSX Registry
C# support for vscode-compatible editors (powered by OmniSharp and NetCoreDbg). ... coreclr debug configuration should support input variables for envFile ...
Read more >Load environment variables from .env file into process.env for ...
config will read your .env file, parse the contents, ... You may turn on logging to help debug why certain keys or values...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@karolz-ms Sounds great
js-debug handles it at launch time, but you could also change this extension to resolve envFile after variables are substituted via the relatively-new post-substitution method in the resolver.