[英]I'm trying to enable error squiggles in VS Code and it's not working and throwing an error message
I'm coding in C++ in VS Code and when the code is wrong, the error squiggles aren't appearing.我在 VS Code 中使用 C++ 进行编码,当代码错误时,不会出现错误曲线。 And when I go into the command palette and use
C/C++: Enable Error Squiggles
I get the following:当我 go 进入命令面板并使用
C/C++: Enable Error Squiggles
我得到以下信息:
Command 'C/C++: Enable Error Squiggles' resulted in an error (command 'C_Cpp.EnableErrorSquiggles' not found)
I've tried restarting, checking for any updates, disabling and then enabling them.我尝试重新启动,检查任何更新,禁用然后启用它们。 Nothing stops this error from coming up.
没有什么能阻止这个错误的出现。 I've also tried reinstalling it via VS Code but nothing seems to work.
我也尝试通过 VS Code 重新安装它,但似乎没有任何效果。
Check to see if squiggles are enabled by going to the settings panel (ctrl+comma) then search for squiggles.通过转到设置面板 (ctrl+comma) 检查是否启用了 squiggles,然后搜索 squiggles。 Make sure the option is checked and enabled.
确保选中并启用该选项。
The squiggles come from the Intellisense engine.曲线来自Intellisense引擎。
First, go to the setting by using ctrl + , .首先,使用ctrl + , go 进行设置。 Then search for error squiggles and make sure the option is enabled.
然后搜索错误曲线并确保该选项已启用。
Go to the setting by using "ctrl" + ",". Go 使用“ctrl”+“,”进行设置。 Then search for error squiggles.
然后搜索错误曲线。 Take care that there are 2 sections in the settings.
请注意设置中有 2 个部分。 Firstly go to the "user" section.
首先 go 到“用户”部分。 Enable it or select "EnabledIfIncludesResolve".
启用它或 select "EnabledIfIncludesResolve"。 Then check the "workspace" section too.
然后也检查“工作区”部分。 If it's disabled there, then enable it or select "EnabledIfIncludesResolve".
如果它在那里被禁用,则启用它或 select "EnabledIfIncludesResolve"。 This will definitely work.
这肯定会奏效。
My best solution is:我最好的解决方案是:
Find your workspace file name Like this settings.json找到你的工作区文件名 Like this settings.json
Then, open the settings.json file然后,打开settings.json文件
Next, find (or) Search "C_Cpp.errorSquiggles": "Disabled" -This Option in settings.json接下来,在settings.json中找到(或)搜索“C_Cpp.errorSquiggles”:“Disabled”-This Option
Change the value: "C_Cpp.errorSquiggles": "Disabled" --> "C_Cpp.errorSquiggles": "Enabled" -This OK: My Explain: find this Line.- "C_Cpp:errorSquiggles": "Disabled" and change the value of "Disabled" to "Enabled" OK!更改值: "C_Cpp.errorSquiggles": "Disabled" --> "C_Cpp.errorSquiggles": "Enabled" -This OK: My Explain: find this Line.- "C_Cpp:errorSquiggles": "Disabled" 并更改值从“禁用”到“启用” OK!
Error squiggles
.Error squiggles
。EnabledIfIncludesResolve
.EnabledIfIncludesResolve
。Modified on Workspace
, if it is disabled, then enable it.Modified on Workspace
,如果它被禁用,则启用它。If you had accidentally disabled it, try this...如果你不小心禁用了它,试试这个...
Do Ctrl + p, and type "settings.json"执行 Ctrl + p,然后输入“settings.json”
You will find the file which contains the value您将找到包含该值的文件
"C_Cpp.errorSquiggles": "Disabled"
Change it into Enabled.将其更改为已启用。
So basically, I did try enabling the error squiggles from the user as well as workbench settings.所以基本上,我确实尝试从用户和工作台设置中启用错误曲线。 That didn't work.
那没有用。
A better solution which worked for me was uninstalling the intellisense from VScode and reinstalling through this link: https://code.visualstudio.com/docs/editor/intellisense对我有用的更好的解决方案是从 VScode 卸载智能感知并通过此链接重新安装: https://code.visualstudio.com/docs/editor/intellisense
This worked like a charm.这就像一个魅力。 Sometimes intellisense becomes less intelligent and needs a refresh: :)
有时智能感知变得不那么智能,需要刷新::)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.