Include errors detected

Or maybe the solar flares have died down?

Fantastic… fingers crossed it stays that way… happy developing! :smiley: :smiley:

My happiness lasted until the restart of the computer.:stuck_out_tongue_winking_eye:
Now this:


Deleted the directory .vscode from project and everything is OK … Until the next reboot.
The holiday continues.:partying_face:

Well, there’s your problem… you shouldn’t have rebooted! :laughing:

So the problem is now only returning after you restart the computer, not when you restart VSCode?

OK. I will no longer turn off the computer. Electricity bill I will send you.:wink:
Yes, now the computer is to blame…:thinking:

1 Like

I Removed User installation of the vscode. Scanned and deleted everything that is possible on the computer mention about vscode. I downloaded and installed System installation of the vscode.
An error sometimes appear. But now just need to restart vscode.
Strange…:thinking:

I do occasionally get the same behaviour, and my Windows install of VSCode is a user (i.e. LOCALAPPDATA) install also. But when when it happens, usually doing a build or deleting the .vscode folder fixes it for quite a while… so this is quite frustrating. :thinking:

Maybe :pray: to the VSCode IntelliSense gods?

It has something to do with adding folders to workspace.
I guess, I got this error after installing WSL addon and changing workspace to Ubuntu folder.
Before that, I had my main Arduino folder with several projects as a workspace and could build any of those projects, as long as the cursor was on one of the files inside the needed project.
Then, even when I changed the workspace back to Windows folder, I got include errors.
For now, I can’t open my main folder with all ESP32 projects as a workspace, since VSCode would show include errors, even when all .vscode folders were deleted.
Yet, I can open a single project folder in the workspace and there’s no include errors. Then, I can add each project to workspace, one by one. WSL extension is disabled. Still no errors.
Hope this helps.

1 Like

As I gather, the only way to have a common cross project library on a folder
is NOT having a common cross project folder !!!
Nice to remind me Windows and Unix have problems

Yes, Windows usually has issues that Linux just doesn’t seem to suffer from. Or it could simply be that Linux users are more experienced and find and fix the problem, so don’t comment about it as much.

There have also been more than a few reports about newer versions of the C/C++ Microsoft extension, which powers the IntelliSense engine (which is what generates the errors you see in the ‘Problems’ tab) - specifically post 0.26.0 and the insiders builds - giving include path erorrs, and how reverting back to 0.26.0 seems to have fixed it. We don’t know what the underlying cause is yet, thus also don’t know when it will be resolved.

Here we go again…
Maybe I found the main reason for bug.
When I try to open lib-files from error console - VSCode tries to find them in the wrong folder (“/ib/” not “/lib/”). Maybe VSCode do same process when tries “links” libs for project?
After deleting .vscode folder and restart:

Also, deleting .vscode folder helps me only before second restart VSCode too.
After second restart VSCode:

P.S.: Project compiling correctly.

Win10 x64
VSCode version 1.42.1
PIO Version 1.10

1 Like

That would certainly explain that error!

PS: That’s the helper extension version, not the PIO version – you’ll find that on the PIO home screen or by running platformio --version… it’s currently 4.2.0 :wink:

Could you open PlatformIO IDE Terminal and type pio upgrade --dev. Restart VSCode.
It is also good to reset C/C++ IntelliSense database via VSCode > View > Command Palette > Search for “C++ reset”…

1 Like

Upgraded -> restarted VSCode -> reseted c++ IS db (also PIO IS rebuilded) -> Problem with wrong path from first screen gone.
But main problem with “#include” still here. And deleting .vscode folder still helps just one restart cycle.

PIO version 4.2.1a3

Could you provide a simple project to reproduce this issue?

Test project folder with library:
https://drive.google.com/open?id=1yBNTMYnIsnvW4rriy9JDAr2fWioEgDmo
Error:

P.S.: Project compiling correctly.

@valeros please help

Does this also happen when you remove all other folders but the test folder from your workspace (you currently have 3 open), and rebuild the Intellisense?

It’s works! Not only with test, with other projects too (when they opened one in time).


But in russian we call this “костыль” (crutch; how this not-serious-patch named in english?).

Please fix this =)

1 Like

You could always downgrade your version of VSCode / Microsoft C++ extension… :stuck_out_tongue: It seems like every time there’s an update to either it’s 50/50 whether stuff that previously worked will now break. Multi-root workspaces and IntelliSense being high on the list of things likely to break. :hammer_and_wrench: :construction:

Looks like it’s a problem with VSCode IntelliSense engine, I’ve opened an issue in their repository:

Let’s see what they’ll come up with.

3 Likes