7

The C/C++ extension by Microsoft has been installed, and everything works really well. But the VSCode does not seem to show any red underline for syntax errors when there are issues.

I'm using Linux (kubuntu) with the pre-installed g++. I can also successfully build my code and run it.

Any suggestions on how to fix this problem?

Sabbir Ahmed
  • 1,468
  • 2
  • 16
  • 21

3 Answers3

9

After reading the comment of the previous answer, it seems like something is wrong with your settings. One final way possible to fix this issue is to reset the settings of Visual Studio Code to its factory defaults.

Delete the files shown below:

  • For Windows: %APPDATA%\Code\User\settings.json
  • For Linux: $HOME/.config/Code/User/settings.json

Or, do it directly from Code:

  1. Press F1 Type user settings
  2. Press Enter Click the sheet icon
  3. You will be redirected to the settings.json file.
  4. Delete all of its content, save and restart.
Rohan Bari
  • 7,482
  • 3
  • 14
  • 34
3

In settings.json:

"C_Cpp.errorSquiggles": "Enabled"

from setting.json  "C_Cpp.errorSquiggles": "Enabled",

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
  • 1
    Answers should be self-contained in SO. See: https://stackoverflow.com/help/how-to-answer – zkoza Mar 02 '21 at 23:29
  • @zkoza Images at "i.stack.imgur.com/" are considered part of Stack, since it's impossible to upload images without it. This post *is* self-contained. – Scratte Mar 07 '21 at 01:16
  • @Scratte OK, my bad. But text should be always preferred to images - like in the other answer. An answer that consists of nothing but a link is not a high quality answer. – zkoza Mar 07 '21 at 02:09
  • @zkoza I'm seeing the code in blue on this post though :) `"C_Cpp.errorSquiggles": "Enabled",` If anything the image is just extra. The short text here says it all. – Scratte Mar 07 '21 at 02:37
-2
  1. Go to settings in VS Code
  2. Search for squiggles
  3. Change c_cpp: Error Squiggles to enalbleifIncludesResolve
NKSM
  • 5,422
  • 4
  • 25
  • 38