IDE 2.3.2 not updating "last sketch edited"

I've grown used to the IDE always starting up with the last Sketch worked upon but this new version seems to have introduced a new oddity.
If I open a new Sketch (again I'm used to it opening in a new window, I just close the older Sketch window down) then later I close the IDE...

Next time I launch the IDE it opens the previous Sketch and not the one I chose to edit last! It doesn't matter how many "new" Sketches I go through, the IDE is "locked" onto the original Sketch that I had when I upgraded to this new version 2.3.2

Any help gratefully received!!
philipj

Last sketch SAVED?

1 Like

Hi @philipj451.

Did you save the sketch you edited last?

Arduino IDE restores the last saved sketch you were working with on startup. So if you were were working with a new sketch that you never saved to a permanent location on your computer, then it is expected that the new sketch will not be restored on the next startup, and whatever the last saved sketch you were using will be restored instead.

Something that might be confusing is that Arduino IDE 2.x opens example sketches as a new sketch. It does this in order to avoid the possibility of the user accidentally making changes to the original example sketch, which might cause a lot of confusion since we treat example sketches as "known good" code.

So if you have an example sketch open at the time you exit the IDE, that example sketch won't be restored on the next startup. However, if you save the example sketch before you exit the IDE, then the saved sketch will be restored on the next startup.

1 Like

Hi,
thank you all for your comments, that is exactly what is happening!!
I can't believe I was being so dumb :frowning:

Onwards and upwards
PhilipJ

You are welcome. I'm glad if I was able to be of assistance. It is somewhat unintuitive behavior.

The developers are tracking the request for allowing Arduino IDE to also restore example sketches on startup here:

If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:

screenshot of Subscribe button


:exclamation: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.


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