I’m using the latest version of VS Code and PlatformIO (as of today), and installed 3 extensions: C/C++ (Intellisense, debugging, code browsing), Arduino, PlatformIO IDE. Within PlatformIO, I’ve also installed a couple of library extensions.
When I create a new project through PIO and select a board, it seems to do everything correctly. However, when I add an include file from one of the libraries downloaded via the library manager, Intellisense stops working and I get the green squiggly line.
Ok, so I read through the forums and found the fix, to add the library manager’s download path to c_cpp_properties.json under includePath and browse.path. I did that and initially it still didn’t work - I had to restart VS Code to get it to pick up the changes.
- when changing c_cpp_properties.json, can there be a “rebuild/rescan” button to avoid having to restart VS Code?
- why do we even need to do this step in the first place, and for every project I may add? since one of the main points of PIO is to manage and integrate the libraries, it seems very odd that at the very least browse.path doesn’t include the library manager’s download path by default, I would think this is a given that it should be a basic feature of setting up a project.
I know that includePath is exact (not recursive) paths, however, I did put only the base .platformio/lib path in includePath and upon restart, VS Code or PIO automatically expanded that into all the resolved paths under lib, which is what I would expect it to do when building a new project (besides adding the BSP paths).
Is this a feature that can be added?