C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
Introducing source dependency reporting with MSVC in Visual Studio 2019 version 16.7
C++20 demands a lot more from the ecosystem than ever before. With C++20 Modules on the horizon the compiler needs to work closely with project systems in order to provide rich information for build dependency gathering and making iterative builds faster for inner-loop development. The compiler and project teams have acknowledged the new relationship and collaborated together to bring a new switch to the compiler toolset which can provide useful information to the build system: . Source Dependency Reporting The new switch for the compiler toolset enables the compiler to generate a source-level dependency report...
AddressSanitizer for Windows: x64 and Debug Build Support
⌚ This post was last updated on March 24, 2021 with up-to-date information as of the 16.9 release of Visual Studio. Special thanks to Jim Radigan and Matthew McGovern for providing the content for this blog post. Note: This feature is now generally available. To get started, take a look at the official AddressSanitizer for Windows with MSVC documentation. Last October, we announced AddressSanitizer support for Windows as part of the x86 retail MSVC toolset. This included an IDE experience in Visual Studio with AddressSanitizer error reporting, visualized in dialog boxes anchored to the source ...
Sign Up for the Private Preview of Visual Studio support for Codespaces!
At the Microsoft Build conference, you may have seen our C++ Codespaces demo (at 26:00). We showed several ways Codespaces can improve your C++ development experience, including offloading your builds and other compute-heavy tasks to the cloud. We’ve already been chatting with many you, and now we are ready to allow more people into the Private Preview. Currently, our support is focused on C++ console applications and library development, so if that sounds like you, sign up for the Private Preview (and make sure to indicate “C++” as your Preferred Dev Language). What is Codespaces? Codespaces are cloud-powe...
Improving code generation time with C++ Build Insights
Code generation time is a significant contributor to total build time for optimized builds. During this step of the compilation process, source code is passed through several algorithms that transform your program into an optimized version that can be executed more efficiently. In general, the optimization of a C++ function happens quickly and poses no problem. In exceptional cases, however, some functions can become large and complex enough to put pressure on the optimizer and noticeably slow down your builds. In this article, we show how you can use C++ Build Insights to determine if slow code generation is a p...
Visual Studio Code C++ Extension July 2020 Update: Doxygen comments and Logpoints
The July 2020 update of the Visual Studio Code C++ extension is now available. This latest release offers brand new features, such as the visualization of Doxygen comments and support for Logpoints while debugging (GDB/LLDB), along with a bunch of enhancements and bug fixes. To find out more about all the changes, check out our release notes on GitHub. Displaying Doxygen Comments Doxygen is a programming tool that generates documentation for source code. You can annotate your code with comments that contain helpful tips about functions, then Doxygen will generate documentation from these comments. With the J...
Initial Support For C++20 Ranges
We are happy to announce that Visual Studio 2019 version 16.6 contains the first user-visible pieces of C++20 Ranges support. We’ve been working on support machinery for a few releases now, but in this release the tip of the iceberg has finally broken the surface of the water and there are now some tools available for users. The Ranges implementation critically depends on C++ Concepts, and as such is usable with both MSVC and Clang in their C++20 Preview modes but not yet well-supported by IntelliSense. (Don’t worry, we’ll have proper IntelliSense support soon.) What’s Available? ...
C++ Linux development with Visual Studio: incremental build improvements and expanded shell support
Visual Studio 2019 allows C++ developers to target both Windows and Linux (including the Windows Subsystem for Linux) from the comfort of a single IDE. Visual Studio 2019 version 16.7 Preview 3 introduces two features specific to Linux development: improved build incrementality for MSBuild-based Linux projects, and support for a wider range of Linux distributions and shells. There are two ways C++ developers can target Linux systems from Visual Studio. Our recommendation for anything cross-platform or with an eye to open-sourcing is our native support for CMake. This allows you to leverage the same source code...
C++20 Features and Fixes in VS 2019 16.1 through 16.6
What's New We've been busy implementing C++20 features in MSVC's compiler and Standard Library, and migrating the latter to microsoft/STL on GitHub - in fact, we've been so busy that we haven't posted a C++ toolset changelog since the VS 2019 16.0 toolset changelog. So, here are the compiler features and STL features/fixes that have shipped for production use in the last year. As a reminder, the /std:c++17 and /std:c++latest compiler options are necessary to use C++17 and C++20 features. VS 2019 16.1 New features (all thanks to our intern Paolo Torres): New l...
Linux development with Visual Studio: first-class support for gdbserver, improved build times with Ninja, and updates to the Connection Manager
With Visual Studio 2019 you can build and debug C++ projects on a remote Linux system or the Windows Subsystem for Linux (WSL). You can get started with Linux development in Visual Studio using MSBuild-based Linux projects or our native support for CMake. CMake lets you use the same source code and build scripts to target multiple platforms and is our recommendation for anything cross-platform or with an eye to open-sourcing. This blog post covers recent improvements to our Linux support in Visual Studio, including: More details on all these new features are listed below. Improved build times wi...