VS Code crashed without saving - how do I get back the code contents?
- I've already checked, but didn't find the file:
%AppData%\Code\Backups
VS Code crashed without saving - how do I get back the code contents?
%AppData%\Code\Backups
You can recover your projects from the VS Code cache either via:
History
# Linux:
~/.config/Code/User/History
# Windows:
%AppData%\Code\User\History
~/Library/Application Support/Code/User/History
.
grep -rl "bootstrap" ./**/*.py
I'm surprised the missing part hasn't been mentioned:
Backups
folder:
# Linux:
~/.config/Code/Backups
# macOS:
~/Library/Application Support/Code/Backups
# Windows:
%APPDATA%\Code\Backups
If you don't have backups, look in the Recycle Bin for possibly finding a deleted version of the file.
You could also set Windows Explorer to show hidden files and look in the folder where the file was last located. You may find there a version of it with a mangled name.
Look also in the temporary files folder (if in doubt run in the Command Prompt
the command set TEMP
).