C++ extension settings reference

The C++ extension settings are highly configurable. This article explains the schema for the c_cpp_properties.json file. For general information about settings in VS Code, refer to Configure settings, as well as the Variables reference and Default VS Code Settings.

Looking to get started with configuring your C++ project? Begin with configure Intellisense.

Example of variables

The following JSON snippet is an example configuration for c_cpp_properties.json. You only need to include relevant variables in your JSON file, and any missing fields are filled in with their default values by the C++ extension.

{
  "env": {
    "myIncludePath": ["${workspaceFolder}/include", "${workspaceFolder}/src"],
    "myDefines": ["DEBUG", "MY_FEATURE=1"]
  },
  "configurations": [
    {
      "name": "Mac",
      "compilerPath": "/usr/bin/clang++",
      "intelliSenseMode": "macos-clang-x64"