Where apps hide your files
VS Code spreads its data across two places on a Mac: your user settings under Application Support, and your extensions in a hidden dot-folder in your home directory. Here is each path, what the odd folders mean, and how to move your setup to another Mac.
~/Library/Application Support/Code/User/settings.json
~/Library/Application Support/Code/User/keybindings.json
~/Library/Application Support/Code/User/snippets/
~/.vscode/extensions/
Settings, keybindings and snippets live under Code/User. The keybindings.json file exists only after you change a shortcut, so it may be missing on a fresh install. Extensions live in the hidden ~/.vscode folder. If you use profiles, each extra profile keeps its own settings.json in Code/User/profiles/<profile ID>/.
The quickest way to open settings is inside the app: press ⇧⌘P and run Preferences: Open User Settings (JSON). To open the folders, use Go > Go to Folder (⇧⌘G) in Finder, or in Terminal:
open ~/Library/Application\ Support/Code/User
open ~/.vscode/extensions
| Folder or file | What it is |
|---|---|
User/globalStorage/ | Per-extension data, one folder per extension ID, plus a state.vscdb state database |
User/workspaceStorage/ | Per-project state, one hashed folder per folder or workspace you have opened |
User/History/ | Local history: automatic copies of files you saved, shown in the Timeline view |
User/profiles/ | Settings for each extra profile, if you created any |
Backups/ | Unsaved edits kept by hot exit, with a workspaces.json index |
logs/ | Session logs, in timestamped folders |
CachedExtensionVSIXs/, CachedData/, Cache/, Code Cache/, GPUCache/ | Caches that VS Code rebuilds |
storage.json | Window and workspace state |
Folders such as workspaceStorage and profiles appear only once you open a folder or create a profile, so a fresh install has fewer.
In ~/.vscode you will also find argv.json (runtime arguments, opened with Preferences: Configure Runtime Arguments), extensions/extensions.json (the index of installed extensions) and a cli folder.
Each extension is a folder named publisher.name-version, for example ms-azuretools.vscode-containers-2.5.0 or dart-code.dart-code-3.144.0. When an extension updates, the new version gets a new folder, and the old one can linger for a while beside it. Do not rename them; VS Code reads extensions.json to know what is installed.
code --list-extensions > extensions.txt, then on the new Mac xargs -n 1 code --install-extension < extensions.txt. Install the code command first with Shell Command: Install 'code' command in PATH from the Command Palette..code-profile file or a secret GitHub gist.settings.json, keybindings.json and the snippets folder are small text files. Copy them to the new Mac and place them in the same folder. Check them for tokens before pasting them anywhere public.Most of this folder is small. Two things grow:
~/.vscode/extensions can reach several hundred MB. Uninstall extensions you do not use from the Extensions view instead of deleting folders.Cache, CachedData, Code Cache, GPUCache and CachedExtensionVSIXs are rebuilt, so with VS Code quit you can move them to the Trash. User/History refills as you save, but the old copies are the point, so remove it only if you do not need local history.Do not clear Backups while VS Code is running or if a window has unsaved work. Do not delete User/globalStorage casually: some extensions keep sign-ins and data there. Check sizes first with:
du -sh ~/Library/Application\ Support/Code ~/.vscode
If VS Code behaves oddly, test before you delete anything. Start it with extensions switched off using code --disable-extensions, or launch it against a fresh data folder with code --user-data-dir /tmp/vscode-test (a disposable folder, so your real settings stay untouched; add --extensions-dir /tmp/vscode-test-ext to leave your extensions out too). If the problem disappears, an extension or a setting is to blame. Help: Start Extension Bisect in the Command Palette then halves your extensions for you until it finds the culprit.
The hashed folders in workspaceStorage map to projects. Inside each one a small workspace.json records which folder it belongs to, so you can identify one without opening the state.vscdb database beside it. Stale ones for deleted projects are safe to remove with VS Code quit, since they only hold per-project state such as open editors.
~/Library/Application Support/Code - Insiders and ~/.vscode-insiders.ls ~/Library/Application\ Support | grep -i code.--user-data-dir and --extensions-dir options, or the VSCODE_EXTENSIONS environment variable for extensions, point VS Code at other folders.Settings you change per project live in the project's own .vscode/settings.json, not here.
Spotlight leaves ~/Library and dot-folders out of its results, so searching for settings.json there finds nothing. Everywhere indexes file names in both places, so typing settings.json lists the user file and every project's .vscode/settings.json together (projects in Documents or on the Desktop need Everywhere to have Full Disk Access), and ⌘↵ reveals the one you want. Typing an extension ID such as dart-code finds its folder in ~/.vscode/extensions at once. It matches names only, not the settings inside.
At ~/Library/Application Support/Code/User/settings.json. You can also open it with the Command Palette entry Preferences: Open User Settings (JSON).
In the hidden folder ~/.vscode/extensions, one folder per extension named publisher.name-version.
Unsaved edits are in ~/Library/Application Support/Code/Backups, and automatic local file history is in ~/Library/Application Support/Code/User/History.
Turn on Settings Sync with Backup and Sync Settings in the Accounts or Manage menu, or copy settings.json, keybindings.json and snippets and reinstall extensions from a code --list-extensions list.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised