I did it many times, and each time I forgot where it was.
Menu File → Preferences → Settings.
I get this:
I want to open file settings.json (editable JSON file) instead. How can I do that?
Settings File Locations The workspace settings file is located under the . vscode folder in your project.
These files have a JSON extension, and JSON files are commonly used to configure vscode settings since they are familiar with many languages and developers, and the JSON structure is straightforward to comprehend. How to Open Settings.json File? There are various ways to open the Settings.json file and we will discuss each of Them.
This is the fastest way to open settings.json file in Visual Studio Code. Press Ctrl + , ( comma) on Windows, or... Press ⌘ + , ( comma) on Mac. Or... Next, on the User Settings screen, click on a small button that looks like a new file icon in upper right corner of the VSCode dashboard:
As mentioned @Juraj Kocan in comments, it happens after last VS Code updates. Show activity on this post. after making this change, VS Code will open its settings as a JSON file, like in older versions of the application, rather than in the new UI.
Open the settings.jsonfile with the Preferences: Open Settings (JSON)command and you should see the error highlighted with red squiggles. How can I reset my user settings? The easiest way to reset VS Code back to the default settings is to clear your user settings.jsonfile.
To open the User settings:
This image was taken in the VS Code online editor
Which, from the manual and depending on platform, is one of:
%APPDATA%\Code\User\settings.json
²$HOME/Library/Application\ Support/Code/User/settings.json
$HOME/.config/Code/User/settings.json
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 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
The aforementioned settings, User and Workspace. Remote settings will appear when using WSL.
By a test this maps to %APPDATA%\Roaming\Code\User\settings.json
, I am not sure by what logic.
On the settings UI page, there's a special button in the top right corner gutter that toggles between the settings.json file and the settings UI.
Bonus Answer:
Add "workbench.settings.editor": "json" to your settings.json file. This will make it so that menu File → Preferences → Settings or ⌘ + , opens your settings.json file by default. Optionally, add a comment at the top to remind yourself where the toggle button is.
// Click the Open Settings (UI) button in the top
// right corner gutter to toggle the settings UI
{
// Other settings in settings.json
// ...
"workbench.settings.editor": "json"
}
Follow these steps:
Visual Studio Code Tips and Tricks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With