IDE 2.0 saving and opening behaviour

I'm having trouble with my sketches being automatically updated or reverted unexpectedly and I cant make heads or tails of it.

IDE 2.0
windows 10


I make a sketch and save it as project1.ino

i find a bug, reopen and edit the sketch and save as project2.ino

this fixes the issue but creates a whole other problem, so i decide to open project1.ino and find a different way to fix the original bug. but this doesn't open project1.ino, it opens project2.ino. project1.ino doesn't seem to exist anymore.

I doublecheck that autosaving is off, painstakingly edit the sketch so that it more closely resembles what project1.ino was like, and hit 'save as', I type project3.ino and hit save:

"are you sure you want to exit the program without saving?"

what? no? thats the opposite of what i want, I must have hit the wrong button. so i hit cancel. I try 'save as' again and see project3.ino is already in the sketch folder, ok weird, it did work. but to be safe i'm going to save this one as project4.ino and hit ok when it asks if i want to exit. I'll close it and open version 4 again just to make sure it's saving properly. seems to work now i'll try and do more bug fixing and save it as project5.ino.

ok lets try to figure this out, in the sketch folder, i have 5 folders: project1, 2, 3, 4, and 5, inside each folder is a corresponding .ino file.

opening project1 should give me the sketch at its worst, since it hasnt been saved since it was overwritten, project 2 should be the same. projects 3 and 4 should be my best effort to revert back to the original sketch, and project5.ino should be the latest version.

In actuality, opening project1 gives me the latest version, as does opening project2, 3, 4, and 5. the the title at the top of the screen is always project5 regardless of which file i actually try to open. maybe theres a different way to open these files?

If in the IDE i go file > sketchbook > project1 i get a sketch titiled "project1" (which is actually the version that is project2 but that's fine) ok lets use this method to open project3 and check on it: and it opens a sketch called project3 and it appears to be the version of the sketch after i did my best to revert back to the original, great!

so it seems like I can access previous saved versions of my sketch i just have to access them through the file menu instead of clicking the icon in windows file manager. super clunky, but not the end of the world.

now that thats figured out, i can hop back into my actual project. i close all the windows and i open project5 annnnd nope, that opens project3. ok lets try the file>sketchbook method: and now i've openned a sketch titled project5, thats a good sign, and a quick scroll to the bottom and ... wait, what? this is still project3 but its name has been updated to project5. Ive lost all my new code. Ok stay calm, it's only several hours of work and unbelievably infuriating, but i can just redo it all.

Great i've got it sorted out and uploaded to the arduino, everything works perfect. but what do I do with my sketch? do try to save it? or should I 'save as'? if i need to reopen this sketch what do I do? i could click on the file but who knows what version i might get, maybe i start a blank sketch to get the IDE running and then file> sketchbook >projectfinal, will that open the sketch i want or will it save over it with this new blank sketch? should i even risk trying to update the sketch or just live with the bug? should i ever try to do another arduino project again?

Does anybody understand how the saving features of the IDE are suppossed to work? Does anybody else find the IDE to be completely erratic and unpredictable?

This bug is being tracked by the Arduino IDE developers here:

This deficiency is being tracked by the Arduino IDE developers here:

Please provide a detailed description of the exact method you used to open the sketch.

Arduino IDE 2.x is in the beta development phase. Arduino is sharing it with the community to offer the opportunity to participate in the development of this free open source project by testing, providing feedback, or working on the code. It is not recommended to use beta software for regular sketch development work.

Yes, but you must use the stable Arduino IDE 1.8.16. You can download it here:

Please only use Arduino IDE 2.x for the purposes of beta testing, and while doing that work with throwaway sketches that you don't care about.

As someone who has spent a lot of time beta testing the IDE, I have certainly experienced my share of erratic and unpredictable! But that's exactly the point of beta testing: to find such behavior and provide high quality bug reports to the developers so that they can focus their efforts on fixing them.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.