Home > other >  Local History directory?
Local History directory?

Time:06-15

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?

CodePudding user response:

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.

CodePudding user response:

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.

  • Related