-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substitute variables in launch configuration keys (and not only in values) #34059
Comments
Yes, currently we are only resolving the values of objects in the configuration, not the keys (which is what you want). |
@nbstar I was wondering if you have found a workaround for this? |
@isidorn since VS Code's use of JSONs sometimes has values on the left hand side (as keys), we should consequently support variable substitution there too (and I've targeted this for "On Deck"). I assume this feature is low-hanging fruit? |
@weinand should not be too complex |
@dbaeumer note that we now also resolve keys not only values in configuraitons since this also affects tasks. |
Verified that variables are substituted in both values and keys:
|
Feature description:
It would be nice to use the environment variable $ {env: variable} in launch.json sourceFileMap, like using the built-in variable $ {workspaceRoot}.
The present situation is that we can write $ {env: variable} in sourceFileMap, but it is not replaced by real path like $ {workspaceRoot}.
So, when debugging with cpptools extension for c++ program,vscode pops up the following message box:
The sourceFileMap is very simple:
This feature is useful for collaborative development of multiple programmers. we can push launch.json on git repo, and do not need everyone to modify it.
The text was updated successfully, but these errors were encountered: