question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support environment variables for paths in .code-workspace files

See original GitHub issue

Issue Type

Feature Request

Description

I’m attempting to use { "path": "${env:APPDATA}/Code/User" } in my workspace to be able to easily open settings.json and keybindings.json as raw files (the custom panels take up too much space and I rarely need them) and it appears variables are not substituted when loading the workspace file.

VS Code Info

VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:34:36.336Z) OS version: Windows_NT x64 10.0.16299

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:101
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

20reactions
nghtstrcommented, Feb 13, 2019

@bpasero, here is a more realistic situation. You are part of a team, and you would like to share the workspace as a part of the GIT repository. Here is an example situation:

{
	"folders": [
		{
			"name": "React Application",
			"path": "."
		},
		{
			"name": "GO Server",
			"path": "../goserver"
		},
		{
			"name": "Database Models",
			"path": "../models-go"
		},
		{
			"name": "GoLang Utilities",
			"path": "../utils-go"
		},
		{
			"path": "${env:HOME}/.go/src/example.com/example/models-go",
			"name": "Models (testing)"
		}
	],
	"settings": {
		"git.ignoreLimitWarning": true
	}
}

Right now, the ${env:HOME} does not work, and I would love to see this actually work.

12reactions
vscodebot[bot]commented, Feb 14, 2020

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Read more comments on GitHub >

github_iconTop 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 >
vscode multiroot workspace path environment variable
I am using the multiroot workspace functionality to view source files from my c project along with several external libraries. I am using...
Read more >
Environment Variables - Gitpod
You can set environment variables for a Gitpod task terminal of VS Code by setting the env property within the task definition in...
Read more >
Initialization at Start of an R Session - R
This code is sourced into the workspace (global environment). ... The path of this file can be specified by the R_PROFILE_USER environment variable...
Read more >
Working with Visual Studio Code — OpenPASS Documentation
win_only MSYS2 Path¶ · Open the start search · Type in “env” and choose “Edit the system environment variables” · Choose “Environment Variables…”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found