jsonvisual-studio-codesettingspreferencecommand-palette

How to open Visual Studio Code's 'settings.json' file


I did it many times, and each time I forgot where it was.

Menu FilePreferencesSettings.

I get this:

Enter image description here

I want to open file settings.json (editable JSON file) instead. How can I do that?


Solution

  • To open the User settings:

    This image was taken in the VS Code online editor The dropdown list seen of the "open settings" options

    Which, from the manual and depending on platform, is one of:

    The Workspace settings will be in a {workspaceName}.code-workspace file where you saved it, and the Folder settings will be in a .vscode folder if and when it has been created.


    Official page on User and Workspace Settings

    As stated by sevencardz below, VS Code includes a button in the Settings UI gutter which can be used to switch between JSON and graphical view.

    The location of the settings UI/JSON toggle in the top-right corner

    The workbench.settings.editor option selects which of the settings files is opened by default when not using the above method, such as with the shortcut +, or through the application menu.

    Footnotes

    1. The aforementioned settings, User and Workspace. Remote settings will appear when using WSL.

    2. By a test this maps to %APPDATA%\Roaming\Code\User\settings.json, I am not sure by what logic.