Reputation: 675
I installed the Arduino extension Arduino extension in VSCode which is supposed to include intellisense however it doesn't seem to be working. This is my c_cpp_properties.json:
And here is an example of the intellisense not working:
As you can see, intellisense should be able to predict the keyword Serial
however it does not.
I have Command Line Tools installed. Is there a missing directory that I should include in the "includePath" property.
Upvotes: 6
Views: 17068
Reputation: 191
add the missing lines into your c_cpp_properties.json (and change some filename to mac equivalent)
especially with "defines": [ "USBCON" ]
to make Serial class to work with intellisense
{
"configurations": [
{
"name": "Win32",
"includePath": [
"<arduino ide installation folder>\\tools\\**",
"<arduino ide installation folder>\\hardware\\arduino\\avr\\**",
"<arduino ide installation folder>\\hardware\\tools\\**",
"<arduino ide installation folder>\\hardware\\arduino\\avr\\cores\\arduino"
],
"forcedInclude": [
"<arduino ide installation folder>\\hardware\\arduino\\avr\\cores\\arduino\\Arduino.h"
],
"intelliSenseMode": "msvc-x64",
"compilerPath": "<arduino ide installation folder>\\hardware\\tools\\avr\\bin\\avr-gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"defines": [
"USBCON"
]
}
],
"version": 4
}
Upvotes: 12
Reputation: 378
Try addding this paths to "browse" as in "includePath"
"browse": {
"limitSymbolsToIncludedHeaders": false,
"path": [
"arduino_install_dir/hardware/tools/avr/avr/include",
"${workspaceRoot}"
]
},
Upvotes: 1