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
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 fromCtrl+Shift+P
, start typing "settings.j", and see the 3 suggestions (the user settings file is located atC:Users{USER_NAME}AppDataRoamingCodeUsersettings.json
(see docs for all OS paths).Compiler settings are in
c_cpp_properties.json
, Compiling settings are intasks.json
, Debugging settings inlaunch.json
. These are in your project folder under the.vscode
folder, and you can search them inCtrl+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!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):
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)
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.