Productivity Improvements for C++: New Default Colorization, Template Argument Filtering in Call Stack Window, and IntelliCode On-By-Default

Nick Uhlenhuth

Nick

New Default Semantic Colorization

In Visual Studio 2019 version 16.3 Preview 2 we’ve introduced a new default semantic colorization scheme for C++. For a long time, many of the default colors were simply black. However, colorization can help you quickly understand the structure of code at a glance. To take advantage of this, we’ve created two new color schemes, and of course you can still customize your colors further by typing “Change font” in the Ctrl + Q search bar.

Under Tools > Options > Text Editor > C++ > View > Color Scheme you can now pick between three presets: Enhanced, Enhanced (Globals vs. Members), and Visual Studio 2017. By default, Enhanced will already be selected. Note that these color schemes change the Default color values, so if you have previously customized a color, you’ll need to reset it to Default if you want the new scheme to take effect (see the “Customizing Individual Colors” section at the bottom of this post).

Enhanced scheme

This is the new default color scheme. The following colors of this colorization differ from Visual Studio 2017:

  • Functions
  • Local variables
  • Escape characters
  • Keyword – control
    • This is a new classification for keywords related to control flow (if, else, for, return)
  • String escape characters
  • Macros

Below are of the Enhanced color scheme for the Light and Dark themes.

Enhanced (Globals vs. Members) Scheme

We also added a preset called “Enhanced (Globals vs. Members)” which is designed to emphasize the scope of your code. In this scheme, global functions and global variables share the same color, while member functions and fields share another color.

For example, notice how “pow” now stands out as a global function.

Visual Studio 2017 Scheme

If you’d like to revert to the Visual Studio 2017 scheme, select the “Visual Studio 2017” preset.

Customizing Individual Colors

We understand that colorization preferences are personal, so if you wish to customize any particular color, you can do so under Tools > Options > Environment > Fonts and Colors.

To use all the default colors, make sure to click “Use Defaults” in the top right.

Template Argument Filtering in Call Stack Window

Previously, when using heavily to moderately templated types (including the STL), the Call Stack window quickly would become overwhelmed with template expansions to the point that became difficult to debug due to poor readability.

Now, you can right-click in the Call Stack Window and toggle “Show Template Arguments” to make room for other important information, and making it much more readable!

 

IntelliCode On-By-Default

In Visual Studio 2019 version 16.2 we added C++ IntelliCode in-box. In version 16.3 Preview 2, we are taking that a step further and have turned the feature on-by-default. This means that, by default, you’ll start to benefit from autocompletion results recommended by a machine-learned prediction model. The recommended results are surfaced at the top of the completion list and are prepended with stars:

For more details on IntelliCode, check out our other C++ IntelliCode blog posts.

Talk to Us!

If you have feedback on any of these productivity features in Visual Studio, we would love to hear from you. We can be reached via the comments below or via email (visualcpp@microsoft.com). If you encounter other problems with Visual Studio or MSVC or have a suggestion, you can use the Report a Problem tool in Visual Studio or head over to Visual Studio Developer Community. You can also find us on Twitter @VisualC and follow me @nickuhlenhuth.

Nick Uhlenhuth
Nick Uhlenhuth

Follow Nick   

6 Comments
John Towerman
John Towerman 2019-08-14 21:17:29
Hi, After VS6.0, VS2002, VS2003, VS2006, VS2008, VS2010, VS2015, VS2017, VS2019, there is no Italic options under Tools > Options > Environment > Fonts and Colors. Hey, Bold has been there since VS6.0 however. What is the real technical reason for not implementing Italics in the code editor? Thanks Edit: Sorry, my fault, Bold has been added after VS6.0
Piotr Maciejewski
Piotr Maciejewski 2019-08-15 06:30:36
I would like to see an option to filter a text in output window. It would help to see for example only required information. Also an option to highlight a given text would be also useful. 
Avatar
Robert Andrzejuk 2019-08-15 13:28:14
"Enhanced" colorization is available in version 16.3.0 Preview 2.0. But the option "Color Scheme" under "Tools > Options > Text Editor > C++ > View" is missing. So it is not possible to change to "Enhanced (Globals vs. Members) Scheme"
Avatar
Dimitar Mirchev 2019-08-16 12:03:12
While we are at it can we get at least some Call Stack Colorization?Colours from different .dlls will be awesome for example. Whatever. That white wall of text is awful.