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)