VS代码在哪里存储数据的本地历史功能?

发布于 2025-02-06 22:45:21 字数 119 浏览 3 评论 0原文

VS代码刚刚引入了应用程序中内置的新的本地历史记录功能。但是,我找不到在本地历史记录打开时将我处理过的旧版本文件存储在计算机上的位置。

有谁知道旧文件版本的本地历史版本存储在Windows和Linux计算机上?

VS Code 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

丑丑阿 2025-02-13 22:45:21

来自 htttps ://github.com/github.com/microsoft/microsoft/vscode/vscode/issues/26339#issuecomment/26339 #issuecomment/2639#issuecomment/ 1070884696

取决于如何运行VSCODE:

  • 本地工作区的本地桌面客户端:本地文件系统
  • 远程文件系统支持的工作区:远程文件系统
  • Web客户端具有远程文件系统支持的工作区:远程文件系统
  • Web客户端具有非文件系统支持的工作区(例如VSCODE.DEV):浏览器中的indexedDB

存储在文件系统中时,有一个名为history的文件夹
文件夹用户存储在user-data-dir上,该文件夹取决于
在您的操作系统上。那是同一地点
备份去或UI状态。

按照这些说明,在Windows 11本地文件系统上,我在

c:\ users \ mark \ appdata \ roaming \ roaming \ code \ code \ user \ history

stable和

c:\ users \ mark \ \ asse \ mark \ histor appdata \ roaming \ code -insiders \ user \ histor

for Insiders。

我无法为Linux回答。但请参阅 https://stackoverflow.com/a/70453798/836330 和linux。它说它在Linux上的〜/.config/code中,但我个人无法验证。

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.

再见回来 2025-02-13 22:45:21

linux
/home/user/.config/vscodium/user/history/

Windows
C:\ User \ User \ user \ appData \ roaming \ vscodium \ user \历史记录

我正在使用vscodium,所以我想您将在路径中用Visual Studio代码替换VScodium。

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.

丶视觉 2025-02-13 22:45:21

在VSCODE APPSETTINGSHOME/“历史

记录:c:\ users< username> \ appdata

\ roaming \ roming \ code \ code \ user \历史macos:$ home/library/application \ support/code/code/user/history

linux:$ home/.config/.config/code/code/code/code/code/code/code/code/code/code/用户/历史

源代码:

    @memoize
    get localHistoryHome(): URI { return joinPath(this.appSettingsHome, 'History'); }

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'); }

别低头,皇冠会掉 2025-02-13 22:45:21

右键单击时间轴条目,然后选择“在文件资源管理器中显示”。

在我的情况下(Windows 11):C:\ User {user} \ AppData \ roaming \ Code \ code \ user \ histor \ histry \ histor \ {id}

“

Right-click the timeline entry and select "Reveal in File Explorer".

In my case (Windows 11): C:\Users{user}\AppData\Roaming\Code\User\History\{id}

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文