230

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.

15 Answers 15

379

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
6
  • 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. Mar 20, 2016 at 11:00
  • removing contents of settings,json worked like a charm thanks for the solution Mar 24, 2019 at 8:26
  • 5
    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.
    – Gonen
    Nov 6, 2019 at 10:23
  • 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. Jan 16, 2020 at 18:38
  • 1
    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
    – Toan NC
    Apr 6, 2021 at 4:55
132

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.

4
  • 7
    Just deleting the code folder did the trick for me. Thanks for actually answering the question. Oct 25, 2018 at 22:51
  • This answer helped me. I am not sure why the key y stopped working in my editor. Disabled all the extensions but it did not work.
    – muasif80
    Sep 25, 2022 at 11:56
  • Deleting the "Code" folder in AppData Roaming fixed it for me on Windows. Cleaning out my VS Code settings.json didn't help either. I don't know why the Selected Answer is "hold Alt", that does absolutely nothing.
    – Ian Smith
    Sep 28 at 17:39
  • Thanks, this worked for, no need to restart, this answer helped me Oct 7 at 11:01
82

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.

3
  • 1
    Also remove the .vscode/ dir in your project folder
    – Pynchia
    Jun 1, 2021 at 6:44
  • 1
    Good point, @Pynchia. In a perfect world, you'd do git clean -dxf, but that's a very sharp knife :-)
    – offby1
    Jun 1, 2021 at 15:42
  • Had Go To Definition and Peek Definition not working and this finally fixed it. Thanks. Dec 9, 2021 at 16:27
37

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

3
  • 1
    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.
    – whisk
    Oct 20, 2019 at 1:16
  • If you experimented with iTerm and then removed it, and now your font looks wonky, try this. Worked for me
    – Amit Kumar
    Jul 2, 2022 at 15:14
  • 3
    If you click the "funnel" icon to the right of the search bar you'll see an option to only show modified settings now.
    – MattD
    Jul 21, 2022 at 21:05
23

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

2
23

Steps to reset on Windows:

  • Press 'Windows-Key"+R , and enter %APPDATA%\Code\User

    enter image description here

    And delete 'setting.json' at this location.

  • Press 'Windows-Key"+R , and enter %USERPROFILE%\.vscode\extensions

    enter image description here

    And delete all the extensions there.

EDIT

After two vote downs added images to make it more clear :)

0
18

You can reset both the user and workspace settings in VS Code as shown in the following screenshots

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

0
15
  1. Go to Menu Bar. Click on File->Preferences->Settings enter image description here
  2. On the top right corner of the Settings tab, click on the 3 dots button ...->Show Modified Settings enter image description here
  3. You can now reset all the modified settings individually enter image description here
6

Go to File -> preferences -> settings.

On the right panel you will see all customized user settings so you can remove the ones you want to reset. On doing so the default settings mentioned in left pane will become active instantly.

2

The best easiest way I found to reset settings:

Open Settings page (Ctrl+Shift+P):

enter image description here

Go onto your desire setting section to reset, click on icon and then Reset Setting :

enter image description here

2

If you just need to reset your profile for a quick test, VSCode 1.71 (Aug. 2022) will propose:

transient profiles

These profiles are deleted automatically once the last window which uses it is closed.

You can create and associate a transient profile from

  • CLI by passing --profile-transient flag. Eg:

    code <folder-uri> --profile-transient
    
  • UI from Command Palette using command Create Transient Settings Profile

These will create a transient settings profile and associate it to the workspace.
Once the workspace is closed (or uses different profile) this profile is deleted.

That can help before going nuclear and deleting your current profile and VSCode settings.

This is released to VSCode Insiders today.

1

Heads up, if clearing the settings doesn't fix your issue you may need to uninstall the extensions as well.

1

If all you want to do is "reset perspective" ala Eclipse (and why is this not in Code anyway?) then select [View] -> [Open View] -> [Run and Debug].

This puts all the panes back, this is what most people mean by "reset perspective".

1
0

In addition to the locations of the 'User' settings, the settings specific to a 'Remote' WSL distro:

enter image description here

are stored in that WSL2 distro at:

$HOME/.vscode-server/data/Machine/settings.json

and the wslpath in Windows would look like:

\\wsl.localhost\Ubuntu-22.04\home\ *wslUser* \.vscode-server\data\Machine\settings.json

0

I'm just doing an update which worked for me.

SO Windows: Access the directory (using the selected answer as reference)

Windows %APPDATA%\Code\User\settings.json, but instead of removing the settings.json file, I've just removed the entired USer folder then restarted the VSCode.

Hope that it can be a quick solution for someone

Not the answer you're looking for? Browse other questions tagged or ask your own question.