How to reset settings in Visual Studio Code?

450,777

Solution 1

You can get your menu back by pressing/holding alt, you can then toggle the menu back on via the View menu.

As for your settings, you can open your user settings through the command palette:

  1. Press F1
  2. Type user settings
  3. Press enter
  4. Click the "sheet" icon to open the settings.json file:

    enter image description here

From there you can delete the file's contents and save to reset your settings.


For a more manual route, the settings files are located in the following locations:

  • Windows %APPDATA%\Code\User\settings.json
  • macOS $HOME/Library/Application Support/Code/User/settings.json
  • Linux $HOME/.config/Code/User/settings.json

Extensions are located in the following locations:

  • Windows %USERPROFILE%\.vscode\extensions
  • macOS ~/.vscode/extensions
  • Linux ~/.vscode/extensions

Solution 2

If you want to reset everything, go to %userprofile%\AppData\Roaming\Code and delete the whole folder after you uninstall the VS code, then install it again.

Also in %userprofile%\.vscode delete extensions folder in case you want to delete all extensions.

Solution 3

This may be overkill, but it seemed to work for me (on a Mac):

#!/bin/sh

rm -rfv "$HOME/.vscode"
rm -rfv "$HOME/Library/Application Support/Code"
rm -rfv "$HOME/Library/Caches/com.microsoft.VSCode"
rm -rfv "$HOME/Library/Saved Application State/com.microsoft.VSCode.savedState"

After I ran that, and restarted VSC, it showed the the "Welcome" screen, which I took to mean that it was starting from scratch.

Solution 4

If you want to start afresh, deleting the settings.json file from your user's profile will do the trick.

But if you don't want to reset everything, it is still possible through settings menu.

settings menu

You can search for the setting that you want to revert back using search box.

You will see some settings with the left blue line, it means you've modified that one.

search setting

If you take your cursor to that setting, a gear button will appear. You can click this to restore that setting.

gear button

You can also use the drop-down below that setting and change it to default.

setting drop down

Solution 5

On Linux environment delete the folder "~/.config/Code" to reset Visual Studio Code Settings.

Share:
450,777

Related videos on Youtube

Arkadiusz Kałkus
Author by

Arkadiusz Kałkus

I’m a full-stack developer specialized in the design, and implementation of corporate web applications. I put emphasis on S.O.L.I.D. craftsmanship and strive to keep my code clean. Because I know how expensive technical debt can be. Because I understand my job is not to write code but to solve problems. Because I want to help people to be more effective through the software.

Updated on January 05, 2022

Comments

  • Arkadiusz Kałkus
    Arkadiusz Kałkus over 2 years

    It's a simple thing and I was pretty sure it's well described, but surprisingly it is not so obvious.

    Here I've found a detailed description of settings file. As it states it should be setting.json file located %APPDATA%\Code\User\settings.json, but in my case it's not there.

    Can someone give me some help with restoring default settings in Visual Studio Code? I've hidden menu bar by accident and I can't find no way to show it back.

  • Arkadiusz Kałkus
    Arkadiusz Kałkus over 8 years
    Thank you Daniel. I'm a little bit surprised that toggling menu bar visibility isn't saved in settings file, but as far as I understand deleting content of user settings should bring default settings, so this is it. Thanks again.
  • RayLoveless
    RayLoveless over 5 years
    Just deleting the code folder did the trick for me. Thanks for actually answering the question.
  • Mahesh Jamdade
    Mahesh Jamdade over 5 years
    removing contents of settings,json worked like a charm thanks for the solution
  • whisk
    whisk over 4 years
    This has to be the best answer if you are looking to get certain things back. The blue line was key into finding things I've changed.
  • Gonen
    Gonen over 4 years
    For step '4.' you could also type @modified in the top-bar and press Enter - will show you just the modified settings. From there you can click each, click the cog ("Manage") and choose Reset.
  • may
    may over 4 years
    but only the user settings here, not all the settings
  • user1783732
    user1783732 over 4 years
    As of version 1.41.1 on macOS, the key bindings are now in keybindings.json under the same directory as settings.json. To restore the default key bindings, just remove changes in keybindings.json.
  • Shivam Jha
    Shivam Jha over 3 years
    This should be the accepted answer. Clear. Concise. To the point. And it works!
  • Henry
    Henry over 3 years
    Perfect solution
  • Toan NC
    Toan NC about 3 years
    Thanks. It's a good way to see the fully JSON settings file that we changed so that we can revert the stuff strange or redundant
  • superjojo140
    superjojo140 about 3 years
  • Pynchia
    Pynchia about 3 years
    Also remove the .vscode/ dir in your project folder
  • offby1
    offby1 about 3 years
    Good point, @Pynchia. In a perfect world, you'd do git clean -dxf, but that's a very sharp knife :-)
  • Ricardo Gellman
    Ricardo Gellman about 3 years
    Another microsoft family way to do simple things
  • Vaibhav Jain
    Vaibhav Jain over 2 years
    Thanks for this. You saved my day :)
  • Olivier Lacan
    Olivier Lacan over 2 years
    Had Go To Definition and Peek Definition not working and this finally fixed it. Thanks.
  • Aiswarya Rajagopalan
    Aiswarya Rajagopalan over 2 years
    This worked for me!thanks
  • Hassan Khan
    Hassan Khan about 2 years
    I used your method and also cleaned all the files manually and final approach to uninstalled manually.
  • Amit Kumar
    Amit Kumar almost 2 years
    If you experimented with iTerm and then removed it, and now your font looks wonky, try this. Worked for me