VS Code Profiles and Workspaces Cheat Sheet
Sidebar
Programming · VS Code Profiles and Workspaces Cheat Sheet
How VS Code organises your setup: profiles, multi-root workspaces, where settings live, Workspace Trust, Settings Sync, extensions and windows. Exact name, what it does, and its default. Sheet 11 in the VS Code series.
Profiles
File > Preferences > ProfilesOpens the Profiles editor (also under the gear button in the Activity Bar)What a profile holdsSettings, keyboard shortcuts, snippets, tasks, extensions, MCP servers and UI layoutProfiles: Switch ProfileChange the profile for the current windowProfiles: Create a Temporary ProfileA throwaway profile that disappears when VS Code closesDefault profileThe profile you already have; it follows your current configurationApply Setting to all ProfilesGear icon on a setting: share that one setting across every profileApply Extension to all ProfilesMake an extension available in every profileProfile templatesPython, Data Science, Doc Writer, Node.js, Angular, Java General, Java Springcode ./project --profile "Web Development"Open a folder with a named profile from the command line%APPDATA%\Code\User\profilesWhere profile data is stored on WindowsMulti-Root Workspaces
File > Add Folder to WorkspacePut several folders in one windowFile > Save Workspace AsWrites the .code-workspace file (VS Code makes the folder paths relative)File > Open Workspace / Open RecentReopen a saved workspace; recent ones are marked Workspacecode --add folder1 folder2Add folders to the last active window from the command linefoldersIn the file: [{ "name": "Site", "path": "astro-site" }]settings / launch / tasksSections inside the .code-workspace file that apply to the whole workspaceextensions.recommendationsExtension IDs suggested to anyone who opens this workspace${workspaceFolder:Name}In launch.json and tasks: refer to one folder of the workspace by its nameWhere Settings Live (low to high priority)
DefaultBuilt-in values: read-only, see Open Default Settings (JSON)User%APPDATA%\Code\User\settings.json, for every project (per profile)Workspace.vscode/settings.json or the settings block of a .code-workspace fileWorkspace folder.vscode/settings.json inside one folder of a multi-root workspace[language] blockOverrides for one language, at user or workspace levelMachine / window scopeA few settings (for example window.*) are ignored at folder levelWorkspace Trust
security.workspace.trust.enabledTurns the feature on or off (default true)security.workspace.trust.startupPromptonce (default), always, never: when to asksecurity.workspace.trust.banneruntilDismissed (default), always, never: the Restricted Mode bannersecurity.workspace.trust.untrustedFilesprompt (default), open, newWindow: files opened from untrusted placessecurity.workspace.trust.emptyWindowTrust empty windows (default true)Workspaces: Manage Workspace TrustCommand Palette: see or change whether this folder is trustedextensions.supportUntrustedWorkspacesPer-extension override of whether it runs in Restricted ModeSettings Sync
Settings Sync: Turn On…Command Palette: sign in and choose what to sync across your machinesWhat can syncSettings, keyboard shortcuts, extensions, snippets, tasks, profiles and UI statesettingsSync.ignoredSettingsSetting IDs never synced, e.g. ["window.zoomLevel"] (default [])settingsSync.ignoredExtensionsExtension IDs never synced (default [])Settings Sync: Show Synced DataCommand Palette: view the stored copy and restore an earlier versionExtensions Housekeeping
Ctrl+Shift+XOpen the Extensions viewextensions.autoUpdateon (default) or off: update extensions automaticallyextensions.autoCheckUpdatesCheck for updates in the background (default true)extensions.ignoreRecommendationsStop suggesting extensions (default false).vscode/extensions.jsonProject file: { "recommendations": […], "unwantedRecommendations": […] }code --list-extensionsPrint the IDs of installed extensionscode --install-extension idInstall an extension from the command line (--uninstall-extension removes it)Disable (Workspace)Turn an extension off for this project onlyWindows & Opening Files
window.openFilesInNewWindowoff (default), on, default: where a double-clicked file openswindow.openFoldersInNewWindowdefault (default), on, offwindow.openWithoutArgumentsInNewWindowOpening VS Code with nothing specified: on (default on Windows/Linux) or offwindow.titleBarStylecustom (default) or native: VS Code's own title bar or the system'swindow.doubleClickIconToCloseDouble-clicking the title bar icon closes the window (default false)code .Open the current folder in VS Code from a terminalcode -n / code -rOpen in a new window / reuse the last windowcode -g file:lineOpen a file at a line numbercode --diff a bOpen the diff editor on two filesSettings Editor & Updates
workbench.settings.editorui (default) or json: what Open Settings opensworkbench.settings.openDefaultSettingsShow the defaults beside your settings.json (default false)workbench.settings.useSplitJSONEdit user settings in a split JSON view (default false)workbench.settings.settingsSearchTocBehaviorfilter (default) or hide: the side list while searchingworkbench.settings.enableNaturalLanguageSearchSearch settings in plain language (default true)update.modedefault (default), start, manual, none: how VS Code updates itselfupdate.showReleaseNotesShow the release notes after an update (default true)A Reasonable Starter Set (my suggestions, not defaults)
One profile per kind of workFor example Web, Python and Writing, so each has only the extensions it needsA saved workspace fileFor projects that always open together, such as a site and its content folder"workbench.settings.editor": "json"Straight to settings.json when you prefer text to the UI"settingsSync.ignoredSettings": ["window.zoomLevel"]Keep per-machine settings like zoom out of sync"extensions.autoUpdate": "on"The default; leave it unless an update broke somethingProfile or workspace? They solve different problems
A profile is your tools: settings, extensions, shortcuts and snippets that follow you into any folder you open with it. A workspace is a project: which folders belong together and the settings that apply to them. You can use both: open a project's .code-workspace file while using the profile that suits that kind of work.
Why are tasks, debugging and some extensions disabled? Restricted Mode
In a folder you have not trusted, VS Code runs in Restricted Mode: tasks, debugging, workspace settings and extensions that run code are limited. Choose Yes, I trust the authors in the prompt, or run Workspaces: Manage Workspace Trust, when you know the folder is safe.