Search code examples
visual-studio-code

Where does VSCode store the enabled/disabled state for extensions?


I've got some extensions installed that are only enabled in a specific workspace.

With settings, normally workspace specific stuff is saved in .vscode/settings.json within the workspace folder. However, this doesn't seem to be the case for extensions.

I know extensions themselves are installed in .vscode/extensions within the user profile folder, but I can't find anything that dictates whether or not they're enabled or disabled. This is true for locally, remotely, and in a given workspace.

Checking through settings sync seems to show an extensions.json that lists all installed extensions with their enabled/disabled state, but I can't find this file locally anywhere in either my workspace, my remote, or locally.

Where is this configuration file?


Solution

  • From a quick test it appears that extension states are stored in state.vscdb sqlite databases under extensionsIdentifiers/disabled key

    Global:

    <vsc user profile folder>/user-data/User/globalStorage/state.vscdb
    

    Workspace-specific:

    <vsc user profile folder>/user-data/User/workspaceStorage/<workspace ID>/state.vscdb
    

    For context, the global settings.json file location is

    <vsc user profile folder>/user-data/User/settings.json
    

    and really does not seem to store extensions list nor state; just their preferences.