Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

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

Closed
ZBHorizon opened this issue Dec 30, 2019 · 58 comments

Comments

@ZBHorizon
Copy link

Anmerkung 2019-12-30 154833

Ich habe Windows 10 un bekomme es einfach nicht hin den Arduino.path anzugeben

@hellyzh
Copy link
Contributor

hellyzh commented Jan 6, 2020

Have you installed Arduino IDE? And please add the setting of "arduino.path", if in Windows, go to Visual Studio Code, click File > Preferences > Settings, then click the Open Settings (JSON) icon in the upper-right corner of the Settings page.
add "arduino.path": "C:\\Program Files (x86)\\Arduino".

@hellyzh hellyzh closed this as completed Feb 17, 2020
@mianqi2016
Copy link

I also meet this problem, and I have installed Arduino-1.8.12 on Ubuntu, but I couldn't find the location of Arduino IDE in it, so I don't know what should be filled in the "Arduino:Path" blank.

@hellyzh
Copy link
Contributor

hellyzh commented May 19, 2020

Fill like this "arduino.path":"/home/User/Arduino1.8.2/arduino-1.8.2" (replace "/home/User/Arduino1.8.2/arduino-1.8.2" with the path of Arduino IDE).

@tariqawni
Copy link

Hi i am new on vscode and i wana ask where i should to fill "arduino.path": "C:\Program Files (x86)\Arduino" ?
go to Visual Studio Code, click File > Preferences > Settings, then click the Open Settings (JSON) icon after that in what line i should to paste this "arduino.path": "C:\Program Files (x86)\Arduino"

@hellyzh
Copy link
Contributor

hellyzh commented Jul 10, 2020

image
Click this icon.

@tariqawni
Copy link

after open settings json in wich line i should to add "arduino.path": "C:\Program Files (x86)\Arduino" ?

@hellyzh
Copy link
Contributor

hellyzh commented Jul 13, 2020

Any line as you like. And use double backslash in windows as "arduino.path": "C:\\Program Files (x86)\\Arduino".

@K-zhao
Copy link

K-zhao commented Jul 24, 2020

I apologize for necroing this post, but adding that didn't seem to fix the issue, even after a restart. I'm on Arduino 1.8.13. Are there potentially any other issues that might cause the extension to not function properly?
image

Edit: It turns out I installed the extension under WSL for VSCode which caused some issues. Using Arduino under Windows VSCode fixed the issue.

@umatbro
Copy link

umatbro commented Aug 20, 2020

I'm struggling with the same issue. arduino is installed in my system, it launches Arduino IDE properly. I'm using Manjaro Linux 20.0.3. Turning VS Code on and off does not have any effect.

Screenshot from 2020-08-20 23-03-40

@VictorVmg
Copy link

I'm struggling with the same issue. arduino is installed in my system, it launches Arduino IDE properly. I'm using Manjaro Linux 20.0.3. Turning VS Code on and off does not have any effect.

Screenshot from 2020-08-20 23-03-40

If your operating system is Windows 7 or higher you should follow the steps below:

  1. Download the Arduino IDE: https://www.arduino.cc/download_handler.php?f=/arduino-1.8.13-windows.exe
  2. Install the downloaded arduino IDE, this will create C:Program Files (x86)Arduino
  3. Download Arduino extension on VSCode (Author: Microsoft)
  4. Go to: file>>preferences>>settings>>Extensions>>Arduino configuration>>edit in setting JSON.
  5. Add the Path: "arduino.path": "C:Program Files (x86)Arduino",
  6. Inside the VSCode Open a new folder
  7. F1+ arduino: initialized
  8. name of the project.

There you go.

image

@umatbro
Copy link

umatbro commented Aug 22, 2020

@VictorVmg I'm using Linux Manjaro - as I stated in my comment. Unfortunately any of the F1 -> Arduino does not work, all are resulting in the same error :(

EDIT I've found the issue. In the arduino.path setting I was providing a path to the arduino executable instead of a directory.
I changed /usr/bin/arduino to /usr/bin and now VS Code seems to be able to detect my Arduino IDE properly :)

@TonyDiana
Copy link

/snap/arduino/41

@Tejas-Rathi
Copy link

GUYS TRY USING THIS CODE

"arduino.path": "C:\\Program Files\\Arduino IDE"

AFTER THIS PRESSctrl=shift=esc
in that window click on visual studio code and click on end task at the bottom right
boot up visual studio code again

@monsefe19
Copy link

for windows
arduino path command path (arduino.exe)
path
(C:\Program Files (x86)\Arduino)

@Andrey-Anatolyevich
Copy link

FYI:
As of now, there are 2 of Arduino IDE available: 1.8 and 2.0 beta
Letting you know, the 2.0 beta doesn't work with VS Code plugin.
You have to use version 1.8.

I've tried to use 2.0, but no luck. After lownloading 1.8 and updating settings of VS Code (arduino.path), the plugin stopped complaining it could not find Arduino IDE.

@drcrook1
Copy link

I'm having this problem as well.

my settings.json
"arduino.commandPath": "C:\Program Files (x86)\Arduino",

I have validated that arduino.exe is inside this folder. I'm on v 1.8.13

@PJensen
Copy link

PJensen commented Apr 29, 2021

Installing from windows store has made it hard to find for me. Best course of action seems to be to install it without the app store.

@sankayop
Copy link

sankayop commented May 9, 2021

@VictorVmg I'm using Linux Manjaro - as I stated in my comment. Unfortunately any of the F1 -> Arduino does not work, all are resulting in the same error :(

EDIT I've found the issue. In the arduino.path setting I was providing a path to the arduino executable instead of a directory.
I changed /usr/bin/arduino to /usr/bin and now VS Code seems to be able to detect my Arduino IDE properly :)

Thanks a lot, this solved it for me :)

@Aj-Nunez
Copy link

Still no luck with getting code to find this

image

why oh why does this have to be so sensitive

@Iiqbal2000
Copy link

If you install Arduino IDE using Snap on Ubuntu, try below:
"arduino.path": "/snap/bin"

It works for me.

@ian185987
Copy link

Only for the ones that can't even solve this. What I have to do was to use a file from Arduino, the ones where you save your projects and add that one as "arduino.path"
vscode

@gone2808
Copy link

How to add path if I dont install Arduino. I just want to install a older version which is .rar file

@Grzybenc69
Copy link

I had problem with that but i find a solution.
If you are on windows instead of "arduino.path": "C:\Program Files (x86)\Arduino", write "arduino.path": "C:\Program Files (x86)",

@gone2808
Copy link

@Grzybenc69 yuh, I have fixed that. but 1 more problem is when I reset vscode, the path is reset to default - which make all added lib path and also arduino.path disapear

@JonasPinto
Copy link

Para sua informação: A partir de agora, existem 2 IDE do Arduino disponíveis: 1.8 e 2.0 beta Para informá-lo, o 2.0 beta não funciona com o plugin VS Code. Você deve usar a versão 1.8.

Tentei usar 2.0, mas sem sorte. Depois de baixar o 1.8 e atualizar as configurações do VS Code (arduino.path), o plug-in parou de reclamar que não conseguia encontrar o IDE do Arduino.

estou utilizando a versão 1.8.16, mesmo assim ainda retorna essa msg

@Jekahome
Copy link

Jekahome commented Nov 8, 2021

Example Path: /home/jeka/Programs/arduino-1.8.16/arduino

"arduino.path": "/home/jeka/Programs/arduino-1.8.16",
"arduino.commandPath": "arduino"

@Francisco-Castillo
Copy link

If you install Arduino IDE using Snap on Ubuntu, try below: "arduino.path": "/snap/bin"

It works for me.

Funcionó, muchas gracias!

@jaindinkar
Copy link

jaindinkar commented Jan 30, 2022

Example Path: /home/jeka/Programs/arduino-1.8.16/arduino

"arduino.path": "/home/jeka/Programs/arduino-1.8.16",
"arduino.commandPath": "arduino"

This works for me on Ubuntu 20.04, Arduino snap version is a bit tedious to deal with as it creates a sandbox environment and is difficult to provide a path for, at least in my case it was not working, I rather downloaded the precompiled arduino-cli v0.20.0, extracted and placed it inside /home/user-name/apps/ then provided paths as described above. Also, if you are using the cli, don't forget to check the Use Arduino Cli in extension settings. You have to download the boards using the board manager and might not get example sketches.

@HappierGore
Copy link

For Windows:
I've installed Arduino IDE from internet, NOT FROM STORE.
After that, I used this config:

"arduino.path": "C:\\Program Files (x86)\\Arduino",
"arduino.commandPath": "arduino.exe"

And now it's working :)

@dnettoRaw
Copy link

dnettoRaw commented Mar 3, 2022

for Mac

"arduino.path": "/Applications",
"arduino.commandPath": "/Contents/MacOS/arduino"

@chinanoahli
Copy link

Is this setting("arduino.path") has to be C:\\Program Files (x86)\\Arduino in windows?
My arduino install path is D:\arduino-1.8.16\arduino.exe, and I put this in my setting.json, it never work:

"arduino.path": "D:\\arduino-1.8.16",
"arduino.commandPath": "arduino.exe",

@arrazolahn
Copy link

For Windows: I've installed Arduino IDE from internet, NOT FROM STORE. After that, I used this config:

"arduino.path": "C:\\Program Files (x86)\\Arduino",
"arduino.commandPath": "arduino.exe"

And now it's working :)

thanks this worked!

@Surendra-Srinivas
Copy link

for Mac
"arduino.path": "/Applications", "arduino.commandPath": "/Contents/MacOS/arduino"

Hey @dnettoRaw its not working. I did as you said, but the problem still persists. Can you please tell what to do...
Screenshot 2022-06-04 at 11 16 26

@dnettoRaw
Copy link

for Mac
"arduino.path": "/Applications", "arduino.commandPath": "/Contents/MacOS/arduino"

Hey @dnettoRaw its not working. I did as you said, but the problem still persists. Can you please tell what to do... Screenshot 2022-06-04 at 11 16 26

hey, to many "," in your config file, maybe is that
171986415-b01f2a9c-1bab-4e09-be76-b564060830da

@Surendra-Srinivas
Copy link

@dnettoRaw Even if I remove the "," there, it is still throwing an error...
Screenshot 2022-06-04 at 11 51 12

@dnettoRaw
Copy link

@Surendra-Srinivas do you try to reinstall your Arduino IDE ? download from Arduino.cc
and copy/paste Arduino.app to /Application (not same as /Users/{YOUR_USER_NAME}/Applications), I remember in my first try, I can't make this work because a have a 'bad' Arduino version

@Surendra-Srinivas
Copy link

@Surendra-Srinivas do you try to reinstall your Arduino IDE ? download from Arduino.cc
and copy/paste Arduino.app to /Application (not same as /Users/{YOUR_USER_NAME}/Applications), I remember in my first try, I can't make this work because a have a 'bad' Arduino version

@dnettoRaw Thank you so much. It worked ! 🥇 💯

@vhdlrocks
Copy link

vhdlrocks commented Jul 8, 2022

VScode version: 1.69.0
Win10
Arduino extension for VScode: 0.4.12
C/C++ extension for VScode: 1.11.1

I had a lot of problems with this and am not a power user, so.... The Arduino CLI setting is turned on by default (didn't know the CLI was a standalone tool), see VScode command pallet: Extensions > Arduino configuration > Arduino: Use Arduino Cli

Turn this off if your not using it and everything should work just fine. The CLI tool (arduino-cli.exe) can be found here if you want it.

@CoryC3K
Copy link

CoryC3K commented Jul 29, 2022

After trying literally every suggestion above, vhdlrocks cued me in to the solution.

Windows 10, VSCode, Arduino IDE.

  1. Install Arduino 1.8-ish from the official website (not v.2+)
  2. Open Arduino IDE and ensure libraries and boards are up-to-date
  3. Install Arduino VSCode extension
  4. Edit settings.json

settings.json should have the following arduino settings:

"arduino.path": "C:\\Program Files (x86)\\Arduino",
"arduino.commandPath": "arduino.exe",
"arduino.useArduinoCli": false,
  1. Re-load the VSCode window (hint: F1 for command palate, then type Developer:Reload Window)
  2. Open a new folder
  3. Open the Command Palate again, but this time type: "Arduino: Initialize"

If that works, you're golden. Hook up your usb, set the programmer and such in the bottom right, then use the upload button up by the file tabs.

That said, devlopment here still is terrible. It routes everything through the "Output" console, so (for example) Leaving a serial monitor up while you're building just cannot be done.

VSCode is great. Arduino is great. They don't work well together.

@Juanc179
Copy link

Hi, i tried

After trying literally every suggestion above, vhdlrocks cued me in to the solution.

Windows 10, VSCode, Arduino IDE.

  1. Install Arduino 1.8-ish from the official website (not v.2+)
  2. Open Arduino IDE and ensure libraries and boards are up-to-date
  3. Install Arduino VSCode extension
  4. Edit settings.json

settings.json should have the following arduino settings:

"arduino.path": "C:\\Program Files (x86)\\Arduino",
"arduino.commandPath": "arduino.exe",
"arduino.useArduinoCli": false,
  1. Re-load the VSCode window (hint: F1 for command palate, then type Developer:Reload Window)
  2. Open a new folder
  3. Open the Command Palate again, but this time type: "Arduino: Initialize"

If that works, you're golden. Hook up your usb, set the programmer and such in the bottom right, then use the upload button up by the file tabs.

That said, devlopment here still is terrible. It routes everything through the "Output" console, so (for example) Leaving a serial monitor up while you're building just cannot be done.

VSCode is great. Arduino is great. They don't work well together.

hi, i don't have arduino in that directory(windows 11). i just downloaded arduino and installed it but the directory in inside c:/program files/arduino_1.18.16.
i tried with that route but the problem "not detecting arduino.h" persist.
i also have the latest rc build of arduino IDE. do you recommend reinstalling all arduino versions? (when i downloaded the 1.18, after alredy having the rc version, it didn't generate any new directories, just launched directly. i copied the extracted files of the .zip file to the program files directory and also didn't work.
image
image
any guess? the project was created from the ESP-IDF extension for vs code using "arduino as a component". it opened the project as you are seeing it in the first image.
thank you for your time.

@hiawui
Copy link

hiawui commented Oct 12, 2022

for Mac

"arduino.path": "/Applications",
"arduino.commandPath": "/Contents/MacOS/arduino"

The latest Arduino IDE app name had been changed to 'Arduino IDE' from 'Arduino'. But this extension is still checking the name 'Arduino', so it should fail to check.

My solution is to use 'arduino-cli' as below which works for me.

"arduino.useArduinoCli": true,
"arduino.path": "/path/to/arduino-cli",
"arduino.commandPath": "arduino-cli"

@tomdelahaba
Copy link

Great starting point, thanks a lot for it, but let me clarify few things for people that are even less aware of such a things than I am :)

  1. install homebrew (https://brew.sh/) (if you have, proceed to step 2)
  2. install arduino-cli (https://arduino.github.io/arduino-cli/0.21/installation/) with brew install arduino-cli
  3. 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 use find instead of which. But which is working for me
  4. lets assume you have the path, for me it was /opt/homebrew/bin/arduino-cli
  5. proceed to VScode, go to settings (well, lets assume we will be working with the json settings
  6. 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

@kjrandez
Copy link

kjrandez commented Oct 18, 2022

After trying literally every suggestion above, vhdlrocks cued me in to the solution.

"arduino.path": "C:\Program Files (x86)\Arduino",
"arduino.commandPath": "arduino.exe",
"arduino.useArduinoCli": false,

This is what finally worked for me. It must be useArduinoCli: false that fixed it. Completely undocumented >:O

I struggled for so long as it worked perfectly on one PC but not this one, well this one has arduino-cli in PATH.

Thanks so much

@zakariae87
Copy link

Should update path variable on windows , i think it should resolve issues related to vs code pop up.

@animeshmaiti
Copy link

only you solved this problem for new arduino user

@animeshmaiti
Copy link

Anmerkung 2019-12-30 154833

Ich habe Windows 10 un bekomme es einfach nicht hin den Arduino.path anzugeben

use arduino 1.8.X vesion 2.x is not compaitable with vs code

@william-green
Copy link

Have you installed Arduino IDE? And please add the setting of "arduino.path", if in Windows, go to Visual Studio Code, click File > Preferences > Settings, then click the Open Settings (JSON) icon in the upper-right corner of the Settings page. add "arduino.path": "C:\\Program Files (x86)\\Arduino".

Looks like the new versions of the IDE breaks it in Windows 10. The only way I could get it working on Windows was with downloading the zip for 1.8.19. You can find it on the legacy downloads page. The newest version (2.02) does not work. Set an environment path variable for your user in the path environment variable. Copy the path to your arduino ide extracted directory into your workspace like you've done

@HydrogenStudioZ
Copy link

HydrogenStudioZ commented Dec 1, 2022

I FIGURED IT OUT!

Download and install this version and it works. This version installs in program files and is the only one that works with VSCode. You can still use the newer version for other things but in order to work with code you need to install and point to the directory of this one.

If you install in default directory your JSON should look like this.

{ "arduino.ignoreBoards": [ ], "arduino.enableUSBDetection": true, "arduino.path": "C:\\Program Files (x86)\\Arduino" }

https://downloads.arduino.cc/arduino-1.8.19-windows.exe

@jelly2187
Copy link

FYI: As of now, there are 2 of Arduino IDE available: 1.8 and 2.0 beta Letting you know, the 2.0 beta doesn't work with VS Code plugin. You have to use version 1.8.

I've tried to use 2.0, but no luck. After lownloading 1.8 and updating settings of VS Code (arduino.path), the plugin stopped complaining it could not find Arduino IDE.

Thanks, following your suggestion, i have solved.

@avdg
Copy link

avdg commented Dec 8, 2022

The cause of the issue might be here:

return fileExistsSync(path.join(arduinoPath, useArduinoCli ? "arduino-cli.exe" : "arduino_debug.exe"));

Not sure what arduino_debug.exe is though

Apparently, placing a dummy (empty) arduino_debug.exe in the path folder fixed the issue on my end. I don't see any use for the specific exe file in the module, so I guess it doesn't break things.

@anonnape
Copy link

What worked for me (fedora , snap installed arduinoIDE) was to edit the arduino Path to ("arduino.path": "/snap/bin/", ) in the json file instead of the UI in Vs Code .
At last don't forget to restart Code.

@berparis
Copy link

berparis commented Dec 31, 2022

MacOS Ventura 13.0.1 with vscode 1.74.2 / Ardino IDE v.2.0.3

I've tried lot of things in the setting to get Arduino extension working but nothing works ... 🤨 :

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

here is the most logical settings I have been tried but it fails :
{ "arduino.path": "/Applications/Arduino IDE.app", "arduino.commandPath": "/Contents/MacOS/Arduino IDE", "arduino.enableUSBDetection": true, "arduino.logLevel": "verbose" }

note: this is exactly the executable path I can see in my terminal console using the unix "ps" command :
"/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE"

Any idea ?

@berparis
Copy link

berparis commented Jan 3, 2023

It's seems "Arduino IDE" versions 2.x are no more supported by vscode. I've installed "arduino-cli" instead and its'ok, vscode arduino extension is runnning ok.

@Splarkszter
Copy link

Splarkszter commented Feb 7, 2023

Linux Mint Arduino 1.8.19

Can't make it work.

@NT26
Copy link

NT26 commented Feb 13, 2023

Please you try to Arduino old version,
I'm use Window OS Arduino 1.8.19 It's work, After change from 2.0.3

@quanguyen
Copy link

quanguyen commented Dec 8, 2023

VS Code 1.85.0 on MacOS Sonoma 14.1.2; Arduino extension v0.6.0

I got the error on every constant and variable declaration and initialization: function ... may not be initialized and expression must be a modifiable lvalue. (attached screenshot)

How should I fix this?

CleanShot 2023-12-08 at 15 14 58@2x

@kameo4242
Copy link

I finally got this Arduino 2.1 + Arduino Cli + VScode working on Windows (with intellisense).
I documented everything here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests