Intellisense giving false error squiggles

I’ve only been using PlatformIO for about a week now, so I’m sorry if I’m doing something dumb, but following an update to the C/C++ Extension on VSCode, I’m now getting error squiggles show in the IDE which wern’t there before.

These appear at various points in the codebase, but I don’t think there are any actual errors with my code, as it builds and uploads just fine.

If it helps, my entire codebase is here, but I don’t think it’s an issue with my code itself.

I think it’s related to the C/C++ extension, as I remember opening the extensions tab of the IDE, seeing an update install, and immediately seeing the squiggles after restarting the IDE. I think a second update to the C/C++ extension has been released since, which also auto installed, but as you can see, didn’t solve the issue.

I hope someone can help. Thanks.

Please try the next:

  1. Run `Left Sidebar > PlatformIO > Rebuild Project C/C++ Index
  2. Uninstall/Install again Microsoft C/C++ extension
  3. Remove .vscode folder from a project
  4. Restart VSCode.

I’ve just tried all of that, it didn’t make any difference.

Is this issue similar with?

I started to make the changes as suggested on the link, but it didn’t make any difference.

I decided, instead, to copy the AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS); line from the config.h file into the main.ino file, and that seemed to fix it…

(…other than the fact it’s now complaining that IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS are all undefined.)

This is making me think that the editor is ignoring the code inside the config.h file (which is being included right at the top via #include "config.h"), something it wasn’t doing before.

This is my main.ino file as it exists right this second, along with my config.h file.


It seems like a bug of VSCode C++ extension. I’ve just seen the same errors. How did I resolve them?

  1. Remove .vscode folder from a project
  2. Restart VSCode

It works now :slight_smile:

I tried that, but it didn’t work. Oh well. Thanks anyway :slight_smile:

Have you resolved this issue? I’ve just downloaded your project and don’t see any issues.

VSCode just updated itself, and I’ve just pulled down the latest PlatformIO update, and yes, I still have the issue.

It’s still only the IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS constants it’s complaining about, since I made these changes, but they’re still complaining about them being missing.