PlatformIO Community

'Arduino.h' file not found

I try to make a code and after this write my console'Arduino.h' file not found

I use the Arduino uno on Mac this vs studio (PlatformIO)
How can fix it ?

Can you show us your code and your platformio.ini file?

And where does the error message appear? Except for the Debug Console nothing is called Console in Visual Studio Code. And it’s unlikely to appear there?

Does the project build?

1 Like

Yes I can show platformio.ini

I hope u can help me
Thx :slight_smile:

1 Like

Please show your code (main.cpp) as well. And for code we prefer text over images. Just put it between two lines with three backquotes (```) to have formatted properly.

1 Like

okay I looking alone and now I disabled
mitaki28.vscode-clang (Look pic)
and the problems don’t come
I hope its right



From the information so far, it looks as if only Intellisense is affected, i.e. you get red squiggly lines in the code editor, related entries in the Problems view but you can still build and upload the project.

The first approach to fix it is to disable all C/C++ related extensions except C/C++ from Microsoft and PlatformIO IDE from PlatformIO.

So by disabling the C/C++ Clang Command Adapter you did the right thing.


But where are the problem by C/C++? Can u help me ?

I’m afraid I don’t understand your question. Can you describe it in more detail?


1.Is the problem now fixed or only temporarily fixed? 2. how is it that c / c ++ does not cause problems for me in the editor and not with others

Disabling the C/C++ Clang Command Adapter should have fixed the problem - permanently.

But I still don’t understand part 2 of your question.You are writing the C/C++ does not cause problem, i.e. works correctly. That’s a good thing, isn’t it?


I think there could be some confusion here:

There are IntelliSense errors, and there are C/C++/compiler errors.

IntelliSense errors are code errors detected by the IntelliSense engine, which analyses your code while you are writing it, and tries to detect potential errors. However, it sometimes doesn’t work properly, and gives ‘false positives’ / says there are errors that don’t really exist. This misbehaviour could be the result of a configuration issue, a conflict with another extension, a bug in the IntelliSense, antivirus software misbehaving or any number of odd conflicts or reasons. Either way, IntelliSense errors are shown in the Problems tab.

There are C/C++/compiler errors, which are detected by the compiler during the build/compile process. These are real errors, as they are preventing the compiler from building your project. They need to be fixed before your project will successfully build. These errors are shown in the Terminal tab.

1 Like

U help me very thx. It’s my first time on this Platform and I never think to become so much help !

1 Like

Ahhhh, now I know what u mean , I disable the
compiler the error are gone but it’s not really good ? I fiddled and didn’t fix it properly?

I am new to programming and try to learn everything. I’m actually a trained electrician

So sorry for maybe stupid questions…

No, not quite… you fiddled… which broke intellisense in the first place (which isn’t hard to do, trust me), and then removed the addon that broke it (mitaki28.vscode-clang), and it came good again :wink:

IntelliSense is nice when it works (as you don’t have to compile the code to find mistakes), but when it doesn’t work, it doesn’t. At that point, you either ignore the ‘Problems’ tab, or you spend lots of time trying to make it work. I do the latter, even when it does work… I just press build/compile when I think I’ve finished something, and wait for the compiler to tell me I did something wrong.

1 Like

ahhh u save my day :slight_smile:
Thank u really!

1 Like