skip to Main Content

I was trying to do some custom settings for the C++ and CMakeTools extensions. But now I want to reset/revert everything to defaults. How do I do that?

  • I tried uninstalling the extensions and re-installing, and they got re-installed with my custom settings wtf.
  • I see no reset buttons in the UI
  • I don’t know where the per-extension settings are stored on my computer.

What am I not understanding? Why is this so unobvious?

2

Answers


  1. Chosen as BEST ANSWER

    There's a Settings tab (and apparently extension settings can be both in the User subtab and the Workspace subtab).

    There's User, Workspace, and Default settings.json's which you can open from Ctrl+Shift+P, start typing "settings.j", and see the 3 suggestions (the user settings file is located at C:Users{USER_NAME}AppDataRoamingCodeUsersettings.json (see docs for all OS paths).

    Compiler settings are in c_cpp_properties.json, Compiling settings are in tasks.json, Debugging settings in launch.json. These are in your project folder under the .vscode folder, and you can search them in Ctrl+Shift+P (but don't write .json at the end or it won't show up).

    Also check your system environment variables for "CXX" and "CC" env variables which can also overwrite the compiler (and the ui says nothing about this).


    Apparently there's no way to reset all settings (the "permanence" is a giant source of ux confusion, a meme decision in my professional opinion).

    Luckily you can just go to Settings and write @modified to see all the settings you've changed!

    see modified settings

    Ok, so to finally answer: HOW do you RESET an individual setting?

    This cannot be "googled": There's an invisible hover hitbox on the left side leading to a hidden settings gear (red dotted line):

    highlighted in red

    This ux is the source of the problem.


    In VSCode, "removing"/"deleting" a setting means "resetting" it. Your settings are just "overwritings". So all auto-defaults should pop back into the UI after a VSCode restart, I hope. (also the aforementioned .vscode settings / env vars / build folder might still override)


  2. As described in this feature request, you cannot do this directly. However, you can open your settings.json file and find the extension settings, then manually remove them.

    Keep in mind, removing the extension won’t remove its settings. So reinstalling the extension will not reset it at all, but keep your previous configuration.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search