VS Code and User Setting for Arduino IDE

Hi Everyone,
I just installed version 2.0.3 of the Arduino IDE. I have also installed VS Code version 1.74.0.

I have added the Microsoft Arduino for Visual Studio Code Extensions version 0.4.12.

I have installed the Arduino IDE to "C:\Users\cuco\AppData\Local\Programs\Arduino IDE" on my PC.

When trying to select the Arduino board type for use with VS Code, I get the message:

"Cannot find Arduino IDE. Please specify the "arduino.path" in the User Settings. Requires a restart after change."

I have added the following to the "settings.json" file for User Settings in VS Code.

{
"arduino.path" : "C:/Users/cuco/AppData/Local/Programs/Arduino IDE",

Thanks for the help with this,
Peter

Check your slashes "/" or "" windows is backwards from Unix, Linux and others.

Thanks for the recommendation.
I tried this in "settings.json"

"arduino.path" : "C:\Users\cuco\AppData\Local\Programs\Arduino IDE",

But, it still did not work.

It might help if you move the installation to a path without spaces and adjust your setting to reflect that.

Alternatively, embed the path on double quotes; not sure how that is done.

Note that I have no experience with it.

Did you ever get it to work?

Hi @sawyerg and @cucotx. There is no way to use Arduino IDE 2.x as a dependency of that VS Code extension as there was with Arduino IDE 1.x.

The reason for this incompatibility is that the VS Code extension uses the command line interface of Arduino IDE 1.x. Arduino IDE 2.x does not have an equivalent command line interface.

The reason why the lack of a command line interface in Arduino IDE 2.x is not a deficiency, and why this lack does not impact the VS Code extension users going forward is that Arduino has created a dedicated command line tool that does everything the Arduino IDE 1.x command line interface did and far more, in a far more powerful, efficient, and user friendly manner. This tool is named "Arduino CLI":

https://arduino.github.io/arduino-cli/latest/

Arduino CLI actually provides all the non-GUI functionality for Arduino IDE 2.x under the hood.

The VS Code extension has support for use with Arduino CLI in addition to Arduino IDE 1.x. You can learn about how to use it in Microsoft's documentation here:

https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino#arduino-cli

This separation of the GUI application from the rest of the functionality is actually a very good thing for applications where the GUI aspects are not needed, such as scripts and alternative development environments like the VS Code extension. You can now install only the functionality you need and skip all the rest that you would never use. Compare the ~25 MB single executable Arduino CLI installation to the >500 MB Arduino IDE 2.x installation which contains >20k files!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.