Did you accidentally close VS Code, leaving the files unsaved?
Is it possible torecover unsaved Visual Studio Code files?
The answer is positive.
![]()
This post onMiniToolintroduces how to recover VS Code unsaved files effectively.
It supports multiple programming languages and various plugins and is widely used by code programmers and developers.
Or, you may accidentally exit the software and forget to back up your files.

Fortunately, the answer is yes.
Read on to get the methods of unsaved/deleted VS Code file recovery.
How to Recover Unsaved/Deleted Visual Studio Code Files
Way 1.

For Windows:C:\Users\username\AppData\Roaming\Code\Backups
For Linux:~/.config/Code/Backups
For macOS:~/Library/utility Support/Code/Backups
Way 2.
Open Visual Studio Code.
Then press theCtrl + Shift + Pkey combination (for Windows) to access Command Palette.
![]()
In the box, typeLocal History: Find Entry to Restoreand pressEnter.
Then you will be prompted to pick the file for which you want to show local history.
Just snag the target one.
![]()
Step 4. choose the local history entry to open based on the file editing time.
Then the previous version of your file will show up.
Way 3.
First, press theWindows + Ekey combination to openFile Explorer.
Here you may see many folders, and each of those represents a file with different versions.
you might open each folder and find the needed items based on file modification time.
Way 4.
It is regarded as thebest data recovery softwarefor Windows due to its comprehensive andsecure data recoverycapabilities and easy operations.
It can help recover almost all kinds of files from various file storage media.
After recovering your files, it is necessary to take some measures to prevent file loss in the future.
Bottom Line
Now you should know how to recover unsaved Visual Studio Code files.
you could check the Backup or History folder or use the Local History: Find Entry to Restore feature.