Visual Studio Code unsaved files location

21

5

Does anyone know where VS code saves unsaved files on a Windows machine?

I have found many discussions about this features, but they don't mention where the files are actually saved.

Josh

Posted 2017-07-03T20:15:53.740

Reputation: 223

Answers

24

The Microsoft help file indicates that the settings are stored in the folder:

Windows - %APPDATA%\Code\User\

For me this translated to:

C:\Users\USERNAME\AppData\Roaming\Code\

In this folder I located a Backups folder, this folder contained the raw data for my document. This appears to be grouped by date stored as a UNIX timestamp.

VS Code cached document location

Burgi

Posted 2017-07-03T20:15:53.740

Reputation: 5 916

7Thanks! On OS X there is a similar folder in ~/Library/Application Support/Code/Backup where my text files were hiding out. – Alper – 2017-08-31T10:36:52.970

1What about Linux? – Colliot – 2018-04-22T09:34:16.163

I don't have a Linux installation to test on unfortunately. However I would guess it is located somewhere in the /home folder. – Burgi – 2018-04-22T14:19:58.807

2On my Chromebook Linux, I found it in ~/.config/Code/Backups/... – apex – 2018-10-02T12:22:50.807

Thank you. I was unable to find the workspace instance my untitled document was created through trial and error; using the Backups folder I found it by date in a matter of seconds and my unsaved work was all there! – Aaron – 2019-11-22T00:18:10.400

8

For Linux users they are found at ~/.config/Code/Backups.

Alex

Posted 2017-07-03T20:15:53.740

Reputation: 221

1~/.config/Code - OSS/Backups and ~/.config/Code - Insiders/Backups for the open source version and the Insiders version, respectively. – Marc.2377 – 2019-06-29T01:49:05.190