Text of code.visualstudio.com › docs › cpp › configure-intellisense as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Configure C/C++ IntelliSense

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Configure C/C++ IntelliSense View as Markdown Ask in VS Code Ask in VS Code Insiders This article is about configuring the C/C++ extension to provide C++ specific IntelliSense suggestions in Visual Studio Code.

IntelliSense is a helpful tool built into VS Code that provides various code editing features to help you code faster and more efficiently. For example, code completion, parameter info, syntax highlighting, Code Actions (light bulbs), and member lists are all generated using IntelliSense. C/C++ IntelliSense only requires a C/C++ compiler to be installed on your system. The C/C++ compiler provides C++ specific information to IntelliSense, such as the locations of system include paths and other settings.

For project level configurations, reference Project level IntelliSense configuration section. When will the C/C++ extension configure core IntelliSense features for me? A compiler is the only requirement to configure core IntelliSense functionality. To identify a compiler for IntelliSense, the C/C++ extension scans common paths on your machine for compilers such as Clang, GCC, MinGW, cygwin, cygwin64, and MSVC. If any of these compilers are identified and in a secure location, they are automatically configured for IntelliSense.

Otherwise, a notification is displayed asking you to confirm that this compiler should be configured for IntelliSense. In either of these scenarios, the compiler selected is also set as the default compiler. How to check whether IntelliSense is configured If you don't have IntelliSense configured, the C/C++ extension shows a yellow indicator in the status bar with a warning sign labeled Configure IntelliSense . To configure, select the status bar indicator, which brings up the configuration Quick Pick .

The Quick Pick can help you select or install a C/C++ compiler. If you do not see a status bar indicator, you can also check your project's c_cpp_properties.json file. This file stores all of your IntelliSense configuration settings. Navigate to this file by selecting C/C++: Edit Configurations (UI) from the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ). Check the IntelliSense mode to find your configuration.

How to configure IntelliSense IntelliSense configuration is stored in the c_cpp_properties.json file, which is automatically created in your workspace. All three of the following options are different ways of editing the c_cpp_properties.json file: Option 1. Select a configuration option through the configuration Quick Pick Open the Quick Pick by entering Select IntelliSense Configuration in the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ), which shows you a dropdown with all of the configuration options found by the C/C++ extension on your machine.

Select one of the options available. If you select a compiler, this compiler is used by IntelliSense by default. You can return to the Configure IntelliSense Quick Pick at any point to change which option is used to configure IntelliSense. If no options are available in the Quick Pick, no compiler could be identified in your system. You can browse your machine manually or install a C/C++ compiler. To install on a Windows machine, select the Help me install a compiler option that redirects you to the step-by-step walkthrough of how to install a C/C++ compiler.

On a macOS or Linux machine, select Install a compiler and navigate through the prompts to have a C++ compiler installed on your machine. Option 2. Edit your IntelliSense configurations through the UI Open your IntelliSense configuration by selecting C/C++: Edit Configurations (UI) from the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ). This view is a user interface for the c_cpp_properties.json file. Set the Compiler path field to the full path of the compiler you're using to build your project.

For example, when using the default install path for GCC on Linux, the compiler path is /usr/bin/gcc . Set the IntelliSense mode to the architecture-specific variant of the compiler you're using. Option 3. Edit the c_cpp_properties.json file directly You can edit the c_cpp_properties.json file directly to customize your configuration. Use the C/C++ Edit Configurations (JSON) command from the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ), then the c_cpp_properties.json file is created in the .vscode folder of your workspace.

Use the compilerPath variable to add a compiler. This variable is the full path of the compiler you're using to build your project. For example, when using the default install path for GCC on Linux, the compiler path is /usr/bin/gcc . For more information about the c_cpp_properties.json file, review the schema reference . Select the sample below based on your operating system for a c_cpp_properties.json file: > Sample c_cpp_properties.json on Windows Using the default install path for MinGW: { "configurations" : [ { "name" : "Win32" , "includePath" : [ "${workspaceFolder}/**" ], "defines" : [ "_DEBUG" , "UNICODE" , "_UNICODE" ], "windowsSdkVersion" : "10.0.22621.0" , "cStandard" : "c17" , "cppStandard" : "c++17" , "intelliSenseMode" : "${default}" , "compilerPath" : "C:/msys64/mingw64/bin/gcc.exe" } ], "version" : 4 } > Sample c_cpp_properties.json on macOS Using the default install path for Clang: { "configurations" : [ { "name" : "Mac" , "includePath" : [ "${workspaceFolder}/**" ], "defines" : [], "macFrameworkPath" : [ "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" ], "compilerPath" : "/usr/bin/clang" , "cStandard" : "c17" , "cppStandard" : "c++17" , "intelliSenseMode" : "macos-clang-arm64" } ], "version" : 4 } > Sample c_cpp_properties.json on Linux Using the default install path for GCC: { "configurations" : [ { "name" : "Linux-GCC" , "includePath" : [ "${workspaceFolder}/**" ], "defines" : [], "compilerPath" : "/usr/bin/g++" , "cStandard" : "c17" , "cppStandard" : "c++17" , "intelliSenseMode" : "gcc-x64" , "browse" : { "path" : [ "${workspaceFolder}" ], "limitSymbolsToIncludedHeaders" : true , "databaseFilename" : "" } } ], "version" : 4 } Project level IntelliSense configuration Configuring IntelliSense with a compiler provides you with core IntelliSense features.

This setup is called the base configuration. For more complex usage scenarios, such as setting up a project that requires: Additional include paths, such as references to one or multiple different libraries Specific compiler arguments that influence the behavior of the language(and therefore IntelliSense) There are multiple other ways to configure IntelliSense. You can provide these additional configurations either through: The c_cpp_properties.json file and related settings A custom configuration provider in the form of another VS Code extension (for example, the Makefile Tools or CMake Tools extensions) A compile_commands.json file Configuration providers A custom configuration provider is another extension in VS Code that can potentially provide more accurate C++ IntelliSense configuration than the C/C++ extension.

For example, for the CMake or Make build systems, where the Makefile Tools or CMake Tools extensions can be configuration providers. To add an extension as a configuration provider, either select the extension through the configuration Quick Pick, add it to configuration UI by editing the Configuration provider field under Advanced Settings , or add the configurationProvider field to your c_cpp_properties.json file. For example, for the CMake extension, the path to add would be ms-vscode.cmake-tools .

The C/C++ extension scans your system for custom configuration providers. If it identifies only one custom configuration provider, this configuration provider is automatica

The rest of this page is on the live site.