Enable error highlight in Visual Studio Code

Viewed 8265

I'm recently using Visual Studio Code for C++ programming and i have an error in my code but, i will like VS Code to highlight it Example

2 Answers

The solution's pretty simple actually. Before that make sure that you're in a C++ file. Then, go to the command palette (Ctrl + Shift + P) and search for "error." Click on the "Enable Error Squiggles" option. That's it.

You need to install at least one extension

  • C/C++ for Visual Studio Code

Follow the instructions specific for your compiler and you will get highlighted error. For example if you wish Microsoft compilers Configure VS Code for Microsoft C++ you will get

enter image description here

Related