I have been trying to use the Arduino extension for VS Code in Ubuntu 18, but when I execute the initialize command, I get the error "Cannot find the Arduino IDE. Please specify the arduino.path in the user settings". So I wrote every path that comes out when executing the command "whereis arduino", I've also tried leaving the box empty (in theory that makes VS Code search for the IDE) and reinstalling both the Arduino IDE and VS Code several times, without any result. Does somebody knows a possible fix for this issue?
-
I am having the exact same issue on Windows. I found the path and copied and pasted it into VSC to no avail. I have the Arduino IDE but may have to use it since VSC wont work. – Andrew Jun 20 '20 at 05:32
-
[Engineerpioneer](https://stackoverflow.com/users/15157948) wrote an [Answer](https://stackoverflow.com/a/66076865) saying "Did you switch on the feature [image](https://i.stack.imgur.com/Iflrn.png). What you should have enabled" – Scratte Feb 08 '21 at 05:46
-
You can try `PlatformIO IDE` extension, it is handy – Md. Yeasin Sheikh May 31 '23 at 20:24
8 Answers
- Download and extract the appropriate Arduino version according to your need from here, and install it using command
sudo ./install
. In my case, I have downloaded Arduino 1.8.6 Linux 64 Bit . - Goto Files -> Preferences -> Settings, Open Settings(JSON) as shown below.
- Change
arduino.path
to the path location of extracted Arduino file. In my case it is/home/user/Downloads/arduino-1.8.6
andarduino.commandPath
toarduino
.
OR
For those who installed Arduino through snap platform refer this post. - Your Settings JSON file should look like this.
{
"arduino.path": "/home/user/Downloads/arduino-1.8.6",
"arduino.commandPath": "arduino",
}
- Save and restart.
It's Done!!
Good Luck
P.S.:Addarduino.commandPath
if not already exist and should point to Arduino executable present in thearduino.path
.

- 121
- 2
- 6
-
Why oh why isn't this answer in the extension README?!? I faffed around for ages with various paths & commands & had no joy - this got it working in 5 seconds flat... Note: Also works with arduino-cli :) Thank you!!! – Ade Feb 15 '22 at 19:04
Even when its on mac, someone can find this helpful as I had the same problem and found this thread. On MAC I have solved this one with arduino-cli and following:
- install homebrew (if you have, proceed to step 2)
- install arduino-cli with
brew install arduino-cli
- find where the arduino-cli is installed. Usually (on mac) it will be
/opt/homebrew/bin/arduino-cli
... Which means, if you run the command arduino-cli, it will execute this script... You can find the location with:which arduino-cli
(I have zsh, I am not aware if it will be the same for older bash, probably it will, I am not so skilled in this one, but you can try to usefind
instead ofwhich
. Butwhich
is working for me - lets assume you have the path, for me it was
/opt/homebrew/bin/arduino-cli
- proceed to VScode, go to settings (well, lets assume we will be working with the json settings
- in my case, the input is following:
"arduino.useArduinoCli": true,
"arduino.path": "/opt/homebrew/bin/",
"arduino.commandPath": "arduino-cli"
Note, even when the path to arduino-cli is /opt/homebrew/bin/arduino-cli
, we are removing the script name from the path... But we are adding this to the commandPath

- 948
- 3
- 13
- 26
I found that running whereis arduino
or which arduino
gave me /usr/local/bin/arduino
. However, this didn't make Visual Studio Code happy. After some more digging, it turns out that that path is just a symlink to /opt/arduino-1.8.13
. (Use ls -la /usr/local/bin/arduino
to see where the symlink points to on your system.)
Also of note: be sure to give the path to the directory, not to the actual executable. For instance, in my case, the proper path was /opt/arduino-1.8.13
NOT /opt/arduino-1.8.13/arduino
!
tl;dr
Use /opt/arduino-1.8.13
, but be sure to update the version number to whatever is installed on your system.

- 124
- 9
This might not work for everyone, but the problem for me was using Visual Studio Code for flatpak. There was probably a better way to fix this, but the easiest way to do it (for me) was to install the binary from their website.

- 76
- 1
- 10
Go to "User Settings" > "Extensions" > "arduino.commandPath" > change it to "arduino_debug.exe"

- 11
- 2
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Neeraj Aug 24 '22 at 05:41
In my case whereis arduino
gave me /usr/bin/arduino
and /usr/share/arduino
, however putting either of them in the arduino.path
didn't work.
Entering /usr/bin
did the trick though. hope it helps!
(Ubuntu 20.04)

- 21
- 4
I use Windows and I solved it as follows.
The problem is because you are using the new version Arduino IDE 2.x.x and it has another way to code its sketches and more (I don't know how to say it, I'm a beginner in this) or you haven't activated to use Arduino Cli at least, so -- ->
- Intall Arduino 1.8.x. You can donwload it here: Arduino Software
- Open your vscode, go to Files>preferences>settings and find your Arduino extension under "Extensions". and put the standard path for Arduino 1.8.x like: C:\Program Files (x86)\Arduino (Remember this is where you installed the Arduino 1.8.x path) in "Arduino Path".
- Next, you need to click on "Arduino: Use ArduinoCli" to link the Arduino extension to the correct version (Arduino Legacy is not allowed). Arduino CLI option in vscode settings

- 1
- 1
Here's what fix my issue!
1st - Make sure you have the right path ("The path to the folder which contains the 'arduino.exe'", and not the path with the 'arduino.exe') copied to your Arduino Settings in VS Code.
2nd (The Actual Fix for me) - After installing the Arduino IDE and the VS Code extension RESTART you entire computer!! This somehow updates the Registry.
After which you can just Initialize your project, F1 - Arduino Initialize. That's it enjoy and start up your Golden IoT project.
Edit: Your main sketch filename must be exact name to your root directory name.
Folder (arduino-vs-test) Sketch (arduino-vs-test.ino)

- 422
- 2
- 7
- 20