Lost main.ts code, is there a way to recover?

I think this exact thing just happened to me while playing around in the Turtle extension;

Went from main.blocks to main.ts, then (for some unknown reason)investigated pxt.json and some of the files in the extension. Then when switching back to block view, mostly everything was gone…

Looked like I was back to the file as it was when I loaded it into the editor an hour or so ago, all the last hour’s progress lost, and could not find a way to get it back.

Another useful reminder to always save/backup often, I guess… :wink:

PS: Thanks by the way, to @kwx, for all the useful information about the uf2conv tool above! I’ve been thinking about how to do this for some while now without luck, until I saw your post here, which I believe was the answer I was looking for. “Ingenting er så ille at det ikke er godt for noe…”, as we say here in Norway.

1 Like