argsFile and envFile in launch.json
See original GitHub issueEnvironment data
dotnet --info
output:
.NET-Befehlszeilentools (2.0.2)
Product Information:
Version: 2.0.2
Commit SHA-1 hash: a04b4bf512
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version: 1.19.1 C# Extension version: 1.13.1
Feature request
In my launch.json I need to pass sensitive data (like passwords) as arguments (or environment variables). As the launch.json is also committed to Git it’s unwise to place the arguments in there. In NodeJS it is already possible to pass a file containing all the arguments (Microsoft/vscode#14523 and Microsoft/vscode-node-debug2@b3e2e8f3).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12 (11 by maintainers)
Top Results From Across the Web
In VS Code-debugger, how do I use envFile in launch.json for ...
I'm using an .env file to store environment variables that I later call with process.env.. When I looked up the VS Code docs...
Read more >How to Set up Environment Variables in "launch.json ...
Here is an example, you set the value in the environment block. { // Use IntelliSense to learn about possible attributes.
Read more >Configuration.md - GitHub
launch.json is used to control the configuration per debug session, and the user setting is shared by the whole workspace or VS Code....
Read more >Configure launch.json for C/C++ debugging in Visual Studio ...
Visual Studio Code generates a launch.json (under a .vscode folder in your project) with almost all of the required information. To get started...
Read more >Microsoft/vscode-go - Gitter
When setting up a launch.json file for debugging, when I attempt to reference my projects .env file using the "envFile" attrib, the file...
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
Its closed because @SebastianPfliegel kindly submitted a PR to fix the part that he wanted. I don’t know off hand if VS Code makes the syntax you are suggesting there possible. But you are welcome to open another feature request issue.
Sorry to necro but why is this closed? It is still not possible to use args in combination with the envFile. I guess that it would require a 2-step replacement on launch, which doesn’t seem to be implemented (or at least it is not working for me). Is that accurate?
E.g. support the following
launch.json
:Expected Result: the
args
values that point to an env variable get replaced for the correct value whether they reside on the OS or the targetenvFile
.