VisualGDB 5.0 Beta 1 – Refactoring and C++ CodeMap

After several preview builds of VisualGDB 5.0 with the new Clang-based IntelliSense engine introducing features from precise code suggestions to fast find-all-references, we are now proud to release the first beta of VisualGDB 5.0. The beta adds a few more features targeted at C++ development productivity:

  • CodeMap for C++ (requires VS2012+, but also works on the free Community Edition)
  • Advanced renaming
  • Intuitive refactoring

Let’s have a detailed look at those new features.

CodeMap

We have added support for C++ code to the CodeMap feature introduced in Visual Studio 2012 for managed code. It works seamlessly just like for C# code: right-click on a function, variable or a field in Visual Studio and select “Show on Code map”:

codemapYou can then right-click on the CodeMap block to view:

  • All functions called by a function
  • All functions calling a given function
  • All functions accessing a field or a global variable
  • For virtual methods, all methods overridden by a method or methods in derived classes overriding it
  • For classes, all base and derived classes
  • For fields and global variables, all functions/methods accessing them
  • All fields/methods inside a class

The CodeMap uses the same heavily optimized code database that we use for go-to-definition and other commands, so running a query takes seconds even for huge code bases like the Linux kernel.

Advanced Renaming

We have added support for seamless renaming of C++ entities. Each time you edit a name of a C++ declaration, VisualGDB will create a smart tag allowing you to rename all references with just one click:

renameRenaming logic automatically discovers overriding/overridden methods in base and derived classes, so renaming a method in an interface won’t break inheritance. Renaming also works for preprocessor macros and updates constructors/destructors when renaming classes.

Seamless refactorring

We have automated the most annoying routine tasks associated with C++ coding. First of all, when you type in a new function or method declaration, VisualGDB recognizes that and offers to generate implementation in the source file. It takes care of the argument indentation and even prefixes nested type names correctly:implWhen adding implementations for constructors, you can select to generate an initialization list and VisualGDB will automatically create one for you. The indentation and positions of commas can be configured via code formatting settings.constr

 

Finally, we have added support for implementing interfaces. When VisualGDB detects that a class that inherits from another class does not override some of its pure virtual methods, it will show a smart tag allowing to implement missing methods with just one click:
ifaceYou can try out the new beta at the VisualGDB download page. And do not hesitate to send your suggestions and bugreports via our support form.