为什么我无法从 VS Code 中找到错误消息“无法写入用户设置”的当前可用答案
"liveServer.settings.AdvanceCustomBrowserCmdLine"-"Chrome" {
"editor.underline": true,
"workbench.colorTheme": "Default High Contrast",
"clang.detectExtensionConflicts": false,`your text`
"debug.onTaskErrors": "showErrors",
"prettier.bracketSameLine": true,
"workbench.editorAssociations": {`your text`
"*.exe": "default"}`your text`
"files.autoSave": "afterDelay",
"C_Cpp.default.compilerPath": "C:\\msys64\\mingw64\\bin\\g++.exe",
"editor.fontSize": 6,
"cmake.additionalCompilerSearchDirs": [
"C:/msys64/mingw32/bin",
"C:/msys64/clang32/bin",`your text`
"C:/msys64/clang64/bin",`your text`
"C:/msys64/clangarm64/bin",
"C:/msys64/ucrt64/bin"
],
"editor.mouseWheelZoom": true,
"terminal.integrated.mouseWheelZoom": true,
"window.zoomLevel": 2
}
我尝试了谷歌搜索的答案,但没有显示 settings.json 中的元素与我打开新文件(文件夹)时为我生成的内容相匹配?没有警告消息或错误消息导致错误消息。
您提供的 JSON 格式完全错误,它可能无法读取。看起来您在开始大括号之前复制粘贴了
AdvanceCustomBrowserCmdLine
键,并且在末尾没有添加逗号。 (workbench.editorAssociations
后缺少逗号)
我已经修复了以下格式:
{
"liveServer.settings.AdvanceCustomBrowserCmdLine": "Chrome",
"editor.underline": true,
"workbench.colorTheme": "Default High Contrast",
"clang.detectExtensionConflicts": false,
"debug.onTaskErrors": "showErrors",
"prettier.bracketSameLine": true,
"workbench.editorAssociations": {
"*.exe": "default"
},
"files.autoSave": "afterDelay",
"C_Cpp.default.compilerPath": "C:\\msys64\\mingw64\\bin\\g++.exe",
"editor.fontSize": 6,
"cmake.additionalCompilerSearchDirs": [
"C:/msys64/mingw32/bin",
"C:/msys64/clang32/bin",
"C:/msys64/clang64/bin",
"C:/msys64/clangarm64/bin",
"C:/msys64/ucrt64/bin"
],
"editor.mouseWheelZoom": true,
"terminal.integrated.mouseWheelZoom": true,
"window.zoomLevel": 2
}
请注意,
"liveServer.settings.AdvanceCustomBrowserCmdLine"
需要浏览器可执行文件的路径,而不仅仅是浏览器的名称。