简体   繁体   中英

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. And when I go into the command palette and use C/C++: Enable Error Squiggles I get the following:

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.

Check to see if squiggles are enabled by going to the settings panel (ctrl+comma) then search for squiggles. Make sure the option is checked and enabled.

The squiggles come from the Intellisense engine.

First, go to the setting by using ctrl + , . Then search for error squiggles and make sure the option is enabled.

Go to the setting by using "ctrl" + ",". Then search for error squiggles. Take care that there are 2 sections in the settings. Firstly go to the "user" section. Enable it or select "EnabledIfIncludesResolve". Then check the "workspace" section too. If it's disabled there, then enable it or select "EnabledIfIncludesResolve". This will definitely work.

My best solution is:

  1. Find your workspace file name Like this settings.json

  2. Then, open the settings.json file

  3. Next, find (or) Search "C_Cpp.errorSquiggles": "Disabled" -This Option in settings.json

  4. 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!

  1. Simply, go to settings by using ctrl + comma .
  2. Search for Error squiggles .
  3. Enable it or select EnabledIfIncludesResolve .
  4. Then click on Modified on Workspace , if it is disabled, then enable it.

If you had accidentally disabled it, try this...

  1. Do Ctrl + p, and type "settings.json"

  2. You will find the file which contains the value

    "C_Cpp.errorSquiggles": "Disabled"
  3. 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

This worked like a charm. Sometimes intellisense becomes less intelligent and needs a refresh: :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM