Repository navigation
Closed
Labels
Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.quick fix
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Linux mint 19.01
- VS Code Version: 1.32.3
- C/C++ Extension Version:0.21
- Other extension: arduino 0.2.25
I can't get the C_Cpp.default.IncludePath get to work. please see details below.
To Reproduce
- i have followed the instruction in https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/Customizing%20Default%20Settings.md
- my
settings.jsonis
{ "C_Cpp.default.includePath": [
"${env.HOME}/.arduino"
]
}my c_cpp_properties.json is:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"/opt/arduino/arduino-1.8.8/tools/**",
"/opt/arduino/arduino-1.8.8/hardware/arduino/avr/**",
"${default}"
],
"forcedInclude": [
"/opt/arduino/arduino-1.8.8/hardware/arduino/avr/cores/arduino/Arduino.h"
],
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}mostly auto generated except ${default}
- i write in
main.inowhich use C++ language as follows:
#include <MFRC522.h>
and got a problem Include file not found in browse.path.
- BUT, when i move the
"${env.HOME}/.arduino"toc_cpp_properties.jsoninsideconfigurations->includePatharray, the problem disappears.
Expected behavior
I expect something like global configuration or default configuration in settings.json so i don't have to re-write configuration each new project to c_cpp_properties.json. and my expectation is the same as issue #368 (comment)
Screenshots
this is the behavior after i edit the c_cpp_properties.json:

Additional context
-none
Metadata
Metadata
Assignees
Labels
Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.quick fix

Activity
sean-mcmanus commentedon Mar 18, 2019
You mention
systemIncludePathandincludePath-- which one are you actually using?The "Include file not found in browse.path." is when the
browse.pathisn't set corectly (i.e. IntelliSense is not being used). It's possible the bug is that we're not correctly copying over theC_Cpp.default.includePathsetting into thebrowse.path.ijash commentedon Mar 18, 2019
my bad, it's
IncludePath. i've updated the post.you mention :
not correctly copying over the
C_Cpp.default.includePathsetting into thebrowse.path.and how to do that?
sean-mcmanus commentedon Mar 18, 2019
Our code is supposed to do that copying -- the bug could be that we don't do that correctly...I'll double check.
ijash commentedon Mar 18, 2019
thank you, if anything I am able to provide for help, please let me know.
sean-mcmanus commentedon Mar 18, 2019
I reproed the bug -- the problem is we aren't not processing the "${env}" when they're in the "default" settings.
[-]C_Cpp.default.systemIncludePath is not working. the same value only works in c_cpp_properties.json[/-][+]${env} isn't processed in C_Cpp.default.includePath[/+]sean-mcmanus commentedon Mar 18, 2019
Thanks for reporting this. We have a fix at #3310, but I don't know if it will make into 0.22.0 yet (otherwise, it'll be in the release after that).
ijash commentedon Mar 19, 2019
thank you for updating this issue, looking forward in the next linux release.
sean-mcmanus commentedon Mar 21, 2019
0.22.0 has the fix for
${env.HOME}not working in the "default.*" settings.