How to enable Error Squiggles in Visual Studio Code

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
3 min

banner

# How to enable Error Squiggles in Visual Studio Code

To enable error squiggles in VS Code:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type error squiggles in the search field and set the C_Cpp: Error Squiggles setting to enabled.

set error squiggles to enabled

If you open a C file that has errors, you should be able to see the error squiggles.

error squiggles enabled

If you want to disable error squiggles, you would set the setting to disabled.

# Make sure you have the C/C++ extension installed

If you can't see the C_Cpp: Error Squiggles setting, make sure you have the c/c++ extension installed and enabled.

  1. Click on Extensions in the left sidebar.
  • You can also open the Extensions menu by pressing:
    • Ctrl + Shift + X on Windows or Linux.
    • Command + Shift + X on macOS.
  1. Type c/c++.

c cpp extension installed and enabled

  1. Make sure the extension is installed and enabled.

Once you install and enable the extension, you will see the C_Cpp: Error Squiggles setting.

# Enable error Squiggles locally in your workspace

If error squiggles are still not shown in your project, try to set the setting locally to your workspace.

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Click on the Workspace tab and type error squiggles.

enable error squiggles for workspace

  1. Set the C_Cpp: Error Squiggles setting to enabled.

If you want to disable error squiggles, you would set the setting to disabled.

When you edit the workspace setting, it overrides any global configuration by updating your .vscode/settings.json file.

Alternatively, you can:

  1. Create a .vscode folder in the root directory of your project.

  2. Create a settings.json file in the .vscode folder.

  3. Add the following code to your settings.json file.

.vscode/settings.json
{ "C_Cpp.errorSquiggles": "enabled" }

enable error squiggles in vscode settings json

If you want to disable error squiggles, set the setting to disabled.

.vscode/settings.json
{ "C_Cpp.errorSquiggles": "disabled" }

# Enable or disable error squiggles using the Command Palette

You can also enable or disable error squiggles using the command palette:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type: enable error squiggles and select the C/C++: Enable Error Squiggles command.

enable error squiggles

If you need to disable error squiggles via the Command Palette:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type: disable error squiggles and select the C/C++: Disable Error Squiggles command.

disable error squiggles

Note that the settings in your local .vscode/settings.json file (workspace-specific settings) always override global settings.

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.