4

Okay, so I'm trying to code & upload to an Arduino with VS Code (Visual Studio Code). When I try to upload or verify my Arduino code, this error pops up:

enter image description here

If you cannot see that, it says:

[Starting] Verify sketch - ir_remote\ir_remote.ino [Warning] Output path is not specified. Unable to reuse previously compiled files. Verify could be slow. See README. Arduino: This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted. [Error] Exit with code=1

Help will be greatly appreciated. I started messing around with the Arduino a few weeks ago, and I've been using VS Code for a long time.

ALSO: Code works completely fine on Arduino IDE, I want to be able to code and upload to an Arduino with VS Code.

I also tried posting this on the Arduino Forum, and no one replied.

dev-aentgs
  • 1,218
  • 2
  • 9
  • 17
Vamp
  • 65
  • 1
  • 7
  • it's Visual Studio, not Virtual Studio... there are tons of tutorials about Arduino with VS Code, did you follow any of them? how did you configure VS Code? the error suggests a bad configuration – Piglet Jul 01 '20 at 06:05
  • Sorry about the misspell. And yes, I did follow the tutorials on configuring Arduino with VS Code. It still does not work. I even tried uninstalling the Arduino extension, then redownloading it, then following a tutorial. – Vamp Jul 01 '20 at 11:50
  • for the warning read https://arduino.stackexchange.com/questions/45347/warning-when-verifying-sketch-with-vs-code for the error you have to make sure your JRE is installed properly and can be found through environment variables or registry. check wether PATH contains the JRE path. google the error messages – Piglet Jul 01 '20 at 13:23

2 Answers2

4

I was able to solve the issue sharing here to help,

I installed Arduino from MS App Store, and i got exactly same error, i uninstalled the Arduino and downloaded installer from Arduino web site, i installed Arduino set the path by pointing to in VS Code settings > extensions > Arduino Configurations > Arduino Path, paste here path to installation folder. And it was all good.

Under project files .vscode folder be sure arduino.json has path set to

"output": "../ArduinoOutput",

Remember that you have to select Development board, Programmer and Serial Port as well in VS Code IDE.

sairfan
  • 970
  • 2
  • 12
  • 20
0

Please View https://maker.pro/arduino/tutorial/how-to-use-visual-studio-code-for-arduino

Arduino Error solve in VS code

Abolfazl Danayi 5 months ago Salaam

I had the same problem and after following the very nice instructions of the author and what Jack said, I found this:

  1. Add "output": "./build" (or wherever you want) to your ".vscode/arduino.json" file, just as Jack mentioned.

  2. Delete ".vscode/c_cpp_properties.json" file. (If you don't do this, the intellisense won't work).

  3. Build the project again (via verification or upload buttons).

  4. Enjoy (And hope the bests for me in the case your problem is done following this routine!)