The IntelliSense engine for VisualGDB - details

Here are the most important features of our new clang-based IntelliSense engine:

Deep and precise C++11 support


The new engine fully supports all the C++11 features supported by clang, such as lambdas, variadic templates, automatic type derivation, range-based loops, etc.

The engine never makes a blind guess - it sees the code the way the compiler does and never gets confused by complex templates or GCC-specific features.

Create-from-use and error correction

The Clang-based engine can automatically generate lots of boilerplate code you would normally write manually:

  • Create methods and fields from use
  • Create constructors interactively:
    • Map arguments to existing fields
    • Map arguments to base class constructors
    • Generate new fields from arguments
  • Fix common errors like omitted namespace with one click
  • Convert 'auto' variables into explicitly typed ones

CodeMap for C++ code

Right-click on a C++ function or variable and select "Show on code map" to explore:

  • Function calls
  • Class hierarchies
  • Overriding methods
  • Type contents
  • Relations between functions and data

Any edition of Visual Studio 2012+ is supported, even the free Community Edition.

Intuitive refactorring

We have made C++ refactorring simple and intuitive:

  • Edit a declaration to get a renaming smart tag
  • Rename overridden methods
  • Preview and select individual changes
  • Create method implementations with one click
  • Easily implement interfaces
  • Generate initializer lists for constructors

The refactoring works for all VisualGDB projects and vs-android projects.

 

Smart code navigation

Right-click on a method, class or a function to explore:

  • Call hierarchy
  • Inheritance hierarchy
  • Virtual method overriding hierarchy

Right-click anywhere and select "Explore Source File" to see the declarations in that file.

Really smart code suggestions

With the new improved code suggestion system finding the right functions and variables has become much easier:

  • Filter suggestions on-the-fly
  • Prioritize matching typess
  • Prioritize non-inherited methodsPrioritize non-inherited methods
  • Selectively show/hide macros, functions, etc.
  • Hide inaccessible or non-const members

Powerful debugger integration

The watch window now supports IntelliSense and understands preprocessor macros.

As long as the debugged file is a part of a VisualGDB project, the engine will automatically get the precise macro values and code suggestions from the line you are stopped at.

Preprocessor lens reveals the unseen

Ever wondered about a strange compilation error on a line filled with preprocessor macros?

The new preprocessor lens feature makes it much easier to understand those kinds or problems. Simply right-click on a line of code and select "Preprocess selected lines" to see the code as seen by the compiler.

Press "Synchronize with the source file" to keep updating the preprocessor lens window as you navigate through the code.

Precise and informative error reporting

The new engine takes error messages directly from the clang compiler. It is fully aware of the GNU language extensions and provides much more information:

  • See warnings as well as errors
  • See template instantiation locations

When you open a header file, the new engine automatically detects a source file that is including it and parses the header in the right context. This results in accurate error messages and code completion.

Smart go-to-definition

We have also improved the usability of the go-to-definition and go-to-declaration commands:

  • When you hit F12 on a macro, you can choose to view the definition of the macro, or the entity referred by it.
  • Go-to-declaration is always instant and finds the best declaration within the current translation unit.
  • Go-to-definition is optimized for large code bases through a highly efficient code database format. Once the code is indexed, finding definitions in large code bases like the Linux kernel takes less than a second!
  • Hit F12 on an #include directive to follow it.

Smarter code formatting

The new engine includes a comprehensive C/C++ code formatter. It works on VS2008-2022, automatically imports the C/C++ style settings from VS and includes many advanced features:

  • Customizable smart padding of enum values
  • Customizable location of ':' and ',' in constructors
  • Auto-format GNU-style initializer lists
  • Advanced formatting of multi-line function calls

Support for GNU-style initializers

The new engine is fully compatible with the GNU-style struct initializers widely used across the Linux codebase:

  • Smart initializer completion excluding already initialized fields
  • Full support in go-to-definition and find-all-references
  • Automatic formatting of multi-line lists

Predictive code suggestion

We have designed our engine to recognize common code patterns and provide suggestions based on them:

  • Suggest "new <type>" for return statements and assignments
  • Suggest enum values for enum variables and arguments

Download

You can get the latest version of VisualGDB with the new engine on the download page.

Feedback

Feel free to give us feedback via our forums or support emails. Please include the diagnostic logs viewed via View->Clang IntelliSense Status:

To improve stability, the engine runs in a separate process and should not crash your Visual Studio. If your Visual Studio hangs, please try terminating CppEngineHost.exe via Task Manager.