"#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit"

I have had the error about includPath and platform packagexxxx.json not found after trying to force the esp idf 4.1 on the wifiscan example.
The includePath is on
“.vscode/c_cpp_properties.json”
but with advice : do not change!
I solved the problem, erasing the line with esp-idf 4.1 in platfomio.ini, and cleaning the project ( second icon to the right of with the upload one, as a delete icon ).
After that it runs again!
Hope that this helps.

1 Like

Is there a more precise tutorial available for fixing this includePath issue? I hope I don’t offend anybody here, they do seem very kind, but there are about 7 different people offering different suggestions, but I don’t get a clear enough idea of how to really resolve this problem.
I like what George Florian has stated, but then again it seems as though it’s mysterious happenstance that may or may not occur, and that you just need to restart your workspace.
It would be great is there was an exact procedure to follow.
One that was written up someplace was to modify the platformio.ini to include the build_flag with the include directories, but that didn’t work.
If you can help that would be much appreciated.
Thanks!

1 Like

I endorse what george.r.wicks said 100%. This forum is a great help and I think the most helpful and non judgemental I have ever been involved with. All that said I have the problem set out by others. It only started a sort time ago and it happened when starting a new project. I have two other projects in the same workspace and they still do not suffer from his annoying “Quirk” The new project is by far the simplest with fewer #includes and hence fewer libs. I have tried most of the “Sticking plaster” solutions so far suggested and non work.The project does all things OK and runs satisfactorily on the ESP 32 when down loaded, I however get the “Squiggles” and the warning on most all the #includes. If its caused by intellisence then for the sake of neatness if not for any other reason why not disable / switch of intellisence. If that were done are there any other possible negative consequences?
Sorry this replay is so far in time from the original but I am new to PlatformIO and have only just found this problem

1 Like

I have this same problem too. Very frustrating. I have tried all of the tip above and nothing works

My project is a simple download of the latest version of Marlin and a bone Stock Creality CR10S code and I can’t get it to compile, I get the dreaded “squiggle” error.

I have deleted .vscode directors and have tried to remove and reinstall VS Code (more than once) removed python (more than once), tired to edit the “c_cpp_properties.json” file.

Nothing works…

Like everyone else (I guess) I managed to fix this on my own… only too about 8 hrs… and 5 re-installations of VS Code… On the last reinstall I deleted all versions of Python on my computer. Not sure if an old version of python was causing my problem, but it is compiling now. Very flaky.

1 Like

One thing to take into account with the advice given in this thread is that it is nearly a year since the initial issue was posted, and the most recent advice is several months old… VSCode and the C/C++ extension (which provides the intellisense squiggles and code suggestions) have had several versions updates, and some pretty major changes to the workspace feature - which for me has yet to break - whereas it was a pretty regular occurrence before.

Often some combination of ensuring no extra conflicting extensions are installed, opening a new window (workspace), uninstalling platforms/frameworks and letting the project reinstall them as needed, cleaning the build cache (via the toolbar button or deleting the .pio folder) or running the ‘rebuild intellisense’ command will unstick whatever gremlin you are suffering. The culprit can be harder to pin down as everyone’s systems and the exact circumstances that broke things vary.

I got stuck with the deadly COVID Squiggles error. Being the hardhead I am I fixed it. May work for others.

Here are the steps I did to fix it.

  1. Close the offending workspace [A Squiggle Problem]
  2. Create a new [SIMPLE] project from PlatformIO home page/ New Project
  3. Add the offending folder to the unnamed workspace you have open
  4. Copy and paste the ,vscode dir from the [SIMPLE] project to the offending one.
  5. Delete the .vscode and rename the .vscode_copy to .vscode in offending project
  6. Save this workspace as [Some Durn Workspace]
  7. Close workspace.
  8. Open original offending workspace [A Squiggle Problem]

clean up and delete the simple project and extra workspace

This worked for me.

Also make sure PlatformIO-IDE: Auto Rebuild Autocomplete Index is turned on.

Hopes this helps some people cause this was frustrating as hell. Now I am on to other include/library issues to make Raspberry Pi and Windows from a common source work.

2 Likes

Can you give this a try next time you have this issue, and see if it fixes it also - as it sounds like you’ve done this the hard way :wink:

  1. Rebuild IntelliSense Index
    image
  2. Either build the the project to wake intellisense up, or you might be able to close-reopen the file/tab - basically you want Intellisense to refresh and use the new configuration.

If that doesn’t fix it, we’ll have to find out what your workaround is doing that the rebuild isn’t. :wink:

2 Likes

I tried to get it to do a Rebuild IntelliSense index from the Command Pallete but NO GO. Was wrapped around the axle somewhere. But thanks I did not try it from that menu.

Thats not a fix, that is a work around.
The fix is in the following link.
My problem was <Servo.h> but it is the fix for includePath
Even the fix is a little kludgy as it is project specific.
My plan is to create a master platformio.ini file and copy to the project folder when I create a new project.

my platformio.ini file now includes the lib_deps entry for <Servo.h>
[env:uno]
platform = atmelavr
board = uno
framework = arduino
lib_deps = arduino-libraries/Servo@^1.1.8

1 Like

I had the same problem. Closing and reopening fixed the issues. I had a file I changed that was getting built from a previous version somehow.