-
Notifications
You must be signed in to change notification settings - Fork 236
[Warning] Failed to generate IntelliSense configuration. #1541
Comments
I had the same problem, was foolishly trying to use new software like |
i fought with this nonsense for 2 days now. am tired of this extremely buggy and poorly maintained vscode extension. |
Sadly, looking at all the unadressed issues, this repo (and extension) seems to be in a pretty poor state and not really usable right now. |
This worked for me as well. |
I found I needed to actually open the Arduino IDE, verify some code, and install a library before the extension worked. I'm assuming this places compilation C/C++ files on the system that the extension uses. On Ubuntu:
|
I went through this VS-Hell as well on Windows , The point for Arduino compiler is that : Arduino IDE 1.xx is supported , as it supports cli (command line interface) calls that VS use to operate. I'v setup Arduino-CLI in VS, specifying the settings.json for compiler specifics: ALSO, check your arduino-cli.yaml init-file to set the arduino directories correct for library recognition. directories: Last but not least: if your have custom libraries in use, CLI does not recognize them as it does not scan your library directory, it looks it up in an index-file. I had to re-install custom libs it using github (cli-command line install) In VS the compiler environment and the C++ code-check environment are not the same, so check the C++ browse path to have code support. i'v not been able to solve the intellisense support. just my 50 cents. |
Same problem here, Arduino IDE 2.x (officialy released now) does not work, and when trying to use the arduino-cli (either the one that is already included in Arduino IDE 2.x or a freshly downloaded arduino-cli.exe file) have the problen that the libraries/dependencies are not (things like cannot open source file "Wire.h") and when trying to verify the project, I get the warning: Failed to generate IntelliSense configuration. Extension is not usable in this state.. |
Same problems as above here. Have yet to get mine to work. Intellisense and Lib errors. The Lib errors I resolved with Arduino-CLI but then intellisense ruins the day. Wasted a week on this |
It works fine on macos, just with the CLI and Arduino 2.0 installed. On windows on the in other hand, I need the old arduino 1.8.x installed for the extension to work properly. |
Can you try again with the recently released version 0.5.0 of the extension? It includes #1591, a fix to the extension's handling of Arduino CLI for generating IntelliSense configurations. |
@benmcmorran I'm having issues with 0.5.0. The command End of Log Output After First Error:
End of Log Output After Second Error:
Contents of [] Contents of {
"configuration": "PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none",
"board": "esp32:esp32:esp32",
"sketch": "simple_esp32_audio.ino",
"output": "./.build"
} |
Thanks for checking. Based on the error messages it looks likely that this is the same issue as arduino/arduino-cli#1646. As a workaround, you can try changing the |
@benmcmorran Moving the output directory to be in a path outside of the sketch directory seems to have fixed it for me. Not sure if that solves the problem for anyone else though. |
Changing the output directory to be outside of the sketch directory fixed it for me too. |
I am on MacOS and cannot get this extension to work, it is so frustrating. Regular errors experienced are unable to locate include files, and failed to generate Intellisense configuration. I really don't like the ArduinoIDE and would much prefer VSCode. I load a file in ArduinoIDE and it compiles and uploads perfectly, load the very same file in the very same sketch folder using VSCode and it fails to find the include files and fails to generate Intellisense configuration. Pulling out what little hair I have left, lol. |
hey @reflectingme . I am not sure why its not working for you. Since the latest update includes arduino-cli, it should be even easier to set up. I am using the following most important settings on my mac with M1 chip:
That seems to do the trick. Otherwise, I do have Arduino IDE 2.0 installed on my Mac. Not sure if that makes a difference. Good Luck :) |
Thanks @anzbert - it is causing me to pull out the little remaining hair I have left :) I am not on M1 but am using the same setup, both parameters empty and use Arduino cli ticked, and I have Arduino IDE 2.0 running, but I still get these darned intellisense and include errors. I run a file in the Arduino IDE and it works fine, and when I try to load and compile the very same file using VScode it does not even compile. So very annoying as I’m pretty much forced to use the IDE when I’d much rather use VScode. Thanks though for your reply. |
Have you tried installed the old Arduino pre2.0 software as well, seeing
if that makes a difference?!
I am just stabbing in the dark here as well?!
…On Sun, Mar 5, 2023, 12:56 John ***@***.***> wrote:
Thanks @anzbert <https://github.com/anzbert> - it is causing me to pull
out the little remaining hair I have left :)
I am not on M1 but am using the same setup, both parameters empty and use
Arduino cli ticked, and I have Arduino IDE 2.0 running, but I still get
these darned intellisense and include errors. I run a file in the Arduino
IDE and it works fine, and when I try to load and compile the very same
file using VScode it does not even compile. So very annoying as I’m pretty
much forced to use the IDE when I’d much rather use VScode.
Thanks though for your reply.
—
Reply to this email directly, view it on GitHub
<#1541 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJIGOFFLXXNNPQBRAMPYTTLW2QMJFANCNFSM6AAAAAARFN2LL4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This issue has been automatically marked as stale because it has been inactive for 30 days. To reactivate the issue, simply post a comment with the requested information to help us diagnose this issue. If this issue remains inactive for another 7 days, it will be automatically closed. |
This issue has been automatically closed due to inactivity. If you are still experiencing problems, please open a new issue. |
For me, the solution came after I opened the .ino file in Arduino IDE and it complained that the file must be in a folder with the same name, proposed to create the folder and move the file. After that, I was able to use vscode. Conclusion, .ino file cannot be at the root of the workspace. |
In my case, after I changed the "name" part from "Win32" to "Arduino" in "c_cpp_properties.json", everything would go fine. VSCode would start to rebuild IntelliSense configuration (manual rebuild can be done by pressing ctrl+alt+I). An example is as below: |
For me, VSCode always reports errors in my
If I apply the Quick Fixes offered that update the
The problem goes on no matter how many times I apply the quick fixes, and after verifying the code or rebuilding IntelliSense, all these quick fixes get reverted. |
I tried so many of the things here without any luck. I was looking again at tingjhenjiang's comment, and then I noticed in the bottom right of the screen that I had the Win32 C++ configuration selected. Changed that to Arduino and my problem went away! Clicking this in the bottom right corner: Will bring up the command palette, and then changing this to Arduino finally fixed it: This issue has been annoying to me for years, but I just ignored it because everything worked OK. Thanks tingjhenjiang for putting me on the right path! |
Rahhhhh, this thing drove me mad for days... Current setup:
What I think could have played a role:
c_cpp_properties.json would be long to share but it was properly generated by a Ctrl+alt+I (regen intellisense config). .vscode\settings.json
c:\user\kameo\AppData\Roaming\code\User\settings.json
.vscode\arduino.json
c:\user\kameo\AppData\Local\Arduino15\arduino-cli.yaml
|
@kameo4242 sometimes being a stubborn donkey is the only way to solve some of these problems! Glad you got it working! |
One thing that might help is to set the name for the .ino file as the same name of the folder it's into, very weird but it worked for me |
yup, that worked thanks ! |
When trying to generate the IntelliSense configuration in

c_cpp_properties.json
, I get this error:This makes the extension pretty much unusable since no IntelliSense info is there - might as well use the Arduino IDE.

The sketch name is the same name as the folder it is in.
The problem also appears in a fresh project.
I have tried reinstalling the Arduino and C/C++ extensions.
I've also uninstalled Visual Studio, VS Build Tools and several other things that could have interfered (as described in other issues with this problem).
I've tried everything I could find and think of for the past 2 hours, no luck. Any help would be greatly appreciated.
System info:
Windows 11 Pro for Workstation 22H2 22623.746
VSCode Version 1.72.2
Arduino CLI Version 0.27.1
Arduino and C/C++ Extensions on their respective newest versions.
Board: Raspberry Pi Pico
Here's my
arduino.json
:And here's my workspace
settings.json
:This is probably related to #1373 #1489 #1514 #1517
The text was updated successfully, but these errors were encountered: