0

VSCode just introduced a new local history feature built into the application. However I cannot find where the older version of files I worked on are stored on my computer when local history is turned on.

Does anyone know where the local history of older file versions are stored on Windows and Linux computers?

janeperritson
  • 17
  • 1
  • 3
  • Does this answer your question? [How to see local history changes in Visual Studio Code?](https://stackoverflow.com/questions/46446901/how-to-see-local-history-changes-in-visual-studio-code) – JΛYDΞV Jun 14 '22 at 12:14
  • This is a duplicate – JΛYDΞV Jun 14 '22 at 12:14
  • although the question has already been answered, I strongly suggest using the optimized search tool in the windows file system called "everything search". Much faster and more customizable than the standard search. – the_RR Aug 21 '23 at 20:05

3 Answers3

1

From https://github.com/microsoft/vscode/issues/26339#issuecomment-1070884696

That depends on how VSCode is run:

  • local desktop client with local workspace: local file system
  • local desktop client with remote file system backed workspace: remote file system
  • web client with remote file system backed workspace: remote file system
  • web client with non-file-system-backed workspace (e.g. vscode.dev): IndexedDB in the browser

When stored in the file system, there is a folder called History in the folder User that is stored at the user-data-dir, which depends on the OS you are on. That is the same location where e.g. also backups go or UI state.

Following those directions, on Windows 11 local file system I found it at

C:\Users\Mark\AppData\Roaming\Code\User\History

for Stable and

C:\Users\Mark\AppData\Roaming\Code - Insiders\User\History

for Insiders.

I can't answer it for Linux. But see https://stackoverflow.com/a/70453798/836330 for more on user-data-dir and Linux. It says it is in ~/.config/Code on Linux but I can't personally verify that.

Mark
  • 143,421
  • 24
  • 428
  • 436
0

in VSCode appSettingsHome/History

Windows:C:\Users<username>\AppData\Roaming\Code\User\History MacOS:$HOME/Library/Application\ Support/Code/User/History. Linux:$HOME/.config/Code/User/History

source code:

    @memoize
    get localHistoryHome(): URI { return joinPath(this.appSettingsHome, 'History'); }
sunyunxian
  • 71
  • 4
-1

Linux /home/USER/.config/VSCodium/User/History/

Windows C:\Users\USER\AppData\Roaming\VSCodium\User\History

I am using VSCodium, so I imagine you will replace VSCodium with Visual Studio Code in the path.

janeperritson
  • 17
  • 1
  • 3