PlatformIO Community

Arduino.h not found by intellisense in VSCode when using custom project library

I have a project with a custom configuration kindly provided by @maxgerhardt to allow me to build ‘hellow world’ for my M5Stack EPD (Paper), which in Arduino has a board type not known to PIO VSCode extension

It builds, installs and runs on the device.

platform = espressif32
board = m5stack-paper
framework = arduino
lib_deps =

platform_packages =

but I have the irritating intellisense error.
I understand it is only cosmetic.

The VSCode quick fix suggests I add a certain folder, but the path looks odd and it doesn’t work anyway.
This is what is currently defined in Microsoft C/C++ Extension include path


I delete the .vscode folder in the project and restarted VSCode, but that didn’t help either. The .vscode directory was not recreated.
I also see suggestions that some extension cause this, but I have the minimum set of extensions necessary for PIO.


Remove the .vscode folder of the project and execute Ctrl+Shift+P → Rebuild IntelliSense in VSCode. Does .vscode/c_cpp_properties.json get regenerated? What’s its content? Does Intellisense work now? If not, what are the other installed extensions in VSCode? Some might conflict.