Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99157

VS Code + Arduino IDE: How to select which sketch will compile? Missing something obvious here

$
0
0

Long-time Arduino IDE user, one-day VS Code + Arduino extension user:

When I first load a sketch and do "Arduino:Initialize", the name of the sketch is stored in the arduino.json settings file, e.g. "sketch": "esp32_test/esp32_test.ino". It then compiles ok when I press the "Verify" button.

But if I close that sketch and open a different one, and then do "Arduino:Initialize", the first file is NOT replaced in the arduino.json file. The first one remains there. I get a message that says, "Arduinio.json is already generated." So when I try to compile the new file, the old one is compiled instead.

The only way I've been able to compile a different file is to manually edit the arduino.json settings file to remove the "sketch": "esp32_test/esp32_test.ino" entry. Then AND ONLY THEN will the .json file update to allow me to compile the new file.

Shouldn't this happen automatically when I select/edit a file and hit the Verify button? Maybe there's an issue with my installation...?

(forgot to mention: VS Code + Arduino on OSX 10.14.6)


Viewing all articles
Browse latest Browse all 99157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>