franneck94 / Vscode-C-Cpp-Runner

🚀 Compile, run and debug single or multiple C/C++ files with ease. 🚀
MIT License
53 stars 14 forks source link

Workspace settings get initialized by global defaults rather than User values #82

Closed lahwaacz closed 2 years ago

lahwaacz commented 2 years ago

When I change e.g. C_Cpp_Runner.cCompilerPath on the User tab to clang and delete the current settings.json in the .vscode directory, the setting gets initialized to /usr/bin/gcc when the .vscode/settings.json file is recreated.

lahwaacz commented 2 years ago

Also I'd appreciate if the extension created .vscode/settings.json only when some setting gets changed. Otherwise the settings are needlessly duplicated and the default values have no meaning because essentially every project/directory gets its own settings file.

franneck94 commented 2 years ago

Isnt it like every project will have a settings file anyway? I wont change that this file is created. However, as you said, the global setting should be used as default value

franneck94 commented 2 years ago

So your bug report is the following:

1.) You already opened a project and the settigns file is created. 2.) Afterwards, you updated the global setting for the compiler path 3.) Deleting the local .vscode/settings file will not take the globally updated setting?

franneck94 commented 2 years ago

This would work as expected, because if only the settings file is removed, the compiler path from the c_cpp_properties file is taken instead of the global setting. So if you update the global setting you should close the current project, delete the whole .vscode folder and then reopen it.