无法覆盖Visual Studio Code默认设置:cppStandard被重置为空
C标准被自动从c17清空的问题
最近在VS Code的输出窗口里看到这条提示:
For C++ source files, the cppStandard was changed from "c++17" to "".
我试过在以下三个设置文件里添加"C_Cpp.default.cppStandard": "c++17"来修复:
- 文件夹设置JSON
- 工作区设置JSON
- 用户设置JSON
操作方式是按Ctrl+Shift+P,选择对应选项(比如"Preferences: Open User/Workspace/Folder Settings (JSON)")打开JSON文件编辑。
但重启VS Code后还是会弹出同样的提示。之前一切正常,参数都设置好了,怀疑是VS Code的新bug。
当前使用的ms-vscode.cpptools扩展版本是1.18.5。我的.vscode/c_cpp_properties.json内容如下:
{ "configurations": [ { "name": "Linux", "includePath": ["${workspaceFolder}/**"] }], "version": 4 }
VS Code版本信息:
Version: 1.84.1 Commit: 2b35e1e6d88f1ce073683991d1eff5284a32690f Date: 2023-11-06T12:35:31.181Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 5.8.0-43-generic
内容的提问来源于stack exchange,提问作者CleanCoder265
相关产品推荐
相关产品推荐

