Fuzzy Intellisense Error - Building is Fine

PlatformIO on VSCode always displays Intellisense error, told me to update the includePath. Since includePath is project dependent, I suppose I should do update includePath everytime I make a new project? Building project is fine. I’ve also tried basic troubleshooting: reopening the program and even reinstalling it. Googled this many times as well. Couldn’t find anything useful. Should I just leave it like that? How can I remove that error message?

I do realize the additional text PlatformIO has added on the beginning of the c_cpp_properties.json file that says "!!! WARNING !!!": "PLEASE DO NOT MODIFY THIS FILE! USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags". This redirects me to edit platformio.ini without knowing what to do.

image

Does Rebuild IntelliSense Index (on the PIO alien head panel) do anything about it? You might need to do a build after running that to make it fully refresh stuff.

If it’s still a path issue, it would probably be a -I<include-directory> build_flag that you would need to add, but I think there is something seriously wrong going on there if the Arduino.h file isn’t automagically discovered!

oh I did rebuild the index! like I said, building (compiling) the project is fine. yeah I think I need to try to add that build flag. but even without it, I can successfully compile. so that’s not the problem, is it?

It’s not a problem if you can compile and upload… i.e. do stuff… without any issues. It may just be a configuration glitch, or maybe related to the configuration in your platformio.ini file.