The Output Window will now show the command lines that are passed to the IntelliSense compiler. Set Enable Logging to True, Logging Level to 5 (most verbose), and Logging Filter to 8 (IntelliSense logging):Įnabling Diagnostic Logging in Tools > Options To check whether IntelliSense compiler is using correct compiler options, including Include Paths and Preprocessor macros, turn on Diagnostic Logging of IntelliSense command lines in Tools > Options > Text Editor > C/C++ > Advanced > Diagnostic Logging. Validating Project Settings via Diagnostic Logging If there are over 1000 errors in the header files included by a source file, then the source file will show only a single error squiggle at the very start of the source file. IntelliSense limits the number of errors it produces to 1000. To see all the errors for the current source file together with all included header files, enable showing IntelliSense Errors in the Error List Window by making this selection in the dropdown: It could happen that earlier errors are preventing IntelliSense from working correctly. If IntelliSense is showing incorrect information (or fails to show anything at all), the first place to check is the Error List window. In this case, the settings controlling IntelliSense and Browsing will be under NMake property page, IntelliSense category: If your project is a Makefile project, then you will see the following properties dialog. If some configurations do not have the same values as the rest, then you will see. By default, All Configurations and All Platforms will be selected, so that the changes will be applied to all build configurations:
To check the project’s configuration, open the Properties for your project. This is especially important for projects that are built outside of Visual Studio: such a project may build without any errors, but show squiggles in Visual Studio IDE. The two settings that have the greatest effect on the accuracy of IntelliSense and Browsing operations are the Include Paths and the Preprocessor macros. This article provides some tips on configuring the projects and describes a few ways that you can investigate configuration problems. Whether you are creating a new (or modifying an existing) C++ project using a Wizard, or importing an project into Visual Studio from another IDE, it’s important to configure the project correctly for the IntelliSense and Browsing features to provide accurate information.