Not like in tasks.json
${ENV} is supported with includePath and browse.path. Is that okay, or did you want the ${env.ENV} syntax to work or for environment variables to work on other properties.
os: Windows 10
vscode version: 1.12.2
extension version: 0.11.2
file a.cpp:
#include <jni.h>
...
c_cpp_properties.json
{
"name": "Win32",
"includePath": [
"${env.JAVA_HOME}/include",
"${env.JAVA_HOME}/include/win32"
],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "",
"path": [
"${env.JAVA_HOME}/include",
"${env.JAVA_HOME}/include/win32"
]
}
Go To Definition works fine just now when cursor on line #include <jni.h>If replace ${env.JAVA_HOME} with absolute path like "C:/Program Files/Java/jdk1.8.0_77, red line gone.
Can you try ${JAVA_HOME}?
${JAVA_HOME} has no problem.
Maybe the document need update.
The docs are from the VS Code team. Our extension supports the different syntax...maybe we should change it to use the ${env.} syntax instead to avoid confusion and conflict with other special variables like ${workspaceRoot}.
Duplicate of https://github.com/Microsoft/vscode-cpptools/issues/697 .
Most helpful comment
The docs are from the VS Code team. Our extension supports the different syntax...maybe we should change it to use the ${env.} syntax instead to avoid confusion and conflict with other special variables like ${workspaceRoot}.