关于VS Code设置同步功能存储用户设置数据位置的技术咨询
Great question! Let me break down exactly where your Settings Sync data lives, since it’s split between cloud storage and local cache:
1. Primary Storage: Microsoft’s Cloud Servers
When you turn on Settings Sync and sign in with your Microsoft account, all your synced data—including preferences, keybindings, installed extensions, user snippets, and more—is encrypted and stored on Microsoft’s cloud servers, tied directly to your account. This is the main reason you can sync your setup across multiple devices: the data travels with your login, not your local machine.
You can’t directly browse or access this cloud storage via a file explorer; you manage it entirely through VS Code’s Settings Sync controls (like toggling sync on/off or resetting your synced data).
2. Local Cache: Temporary Local Copy
VS Code keeps a local cache of your synced data to work offline or speed up sync operations. This is just a temporary backup, not the source of truth for your synced settings. The cache location varies by operating system:
- Windows:
%APPDATA%\Code\User\sync - macOS:
~/Library/Application Support/Code/User/sync - Linux:
~/.config/Code/User/sync
If you delete this folder, don’t worry—VS Code will just re-download your synced data from the cloud the next time you launch it (as long as you’re online and signed in).
Note: If you used the older, deprecated version of Settings Sync that tied to GitHub, that data was stored in a GitHub Gist. But the current official Settings Sync exclusively uses Microsoft’s cloud servers.
内容的提问来源于stack exchange,提问作者Allan Xu

