In VS Code, where are user settings saved and where to look for them?

139 Views Asked by At

In vscode, I am quite confused where to change settings and where to find them. There seems at least two places: Settings and Command Palette.

For a specific example, I am using vscode for Python.

I set my Python interpreter using

Command Palette->search: Python -> select: Python: Select Interpreter

It works for me. But I cannot find where this setting is stored.

I opened

Command Palette->search: Settings -> select: Preferences: Open User Settings (JSON)

I cannot find my selected Python interpreter in settings.json. However, the interpreter works after vscode restarts.

Is there any guideline where to look for a setting and where the setting is stored?

'Where' means among 'Settings', 'Command palette', or other places that I am not aware of.

My vscode is version 1.77.3, 2023-04-12, on Windows 10

I would like to know:

  • How vscode stores the user settings
  • Why vscode spreads all the configuration around: some in settings.json, while others in state.vscdb.
  • What the design philosophy behind this

I am suggested with this post answer to my example. But this only answers 1 specific setting, not a general guideline.

1

There are 1 best solutions below

3
Mastermind On

VSCode stores the interpreters in a sqlite database, on one of these paths: $HOME/.config/Code/User/globalStorage/state.vscdb $HOME/.config/Code/User/workspaceStorage/state.vscdb

You can check this answer.