C++ Team Blog

The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team

Latest posts

Aug 10, 2021
Post comments count 8
Post likes count 0

ARM64EC Support in Visual Studio

Moyo Okeremi

ARM64EC (“Emulation Compatible”) is a new application binary interface for building apps for Windows 11 on ARM. With ARM64EC, you can build new native apps that can run on ARM or incrementally transition existing x64 apps to native performance on ARM. With Visual Studio, you can start building your projects as ARM64EC and enjoy the benefits.

Aug 10, 2021
Post comments count 19
Post likes count 2

Moving a project to C++ named Modules

Cameron DaCamara

There is a lot of hype (and perhaps restraint) to using modules in projects. The general blocker tends to be build support, but even with good build support there is a distinct lack of useful resources for practices around moving projects to using named modules (not just header units). In this blog we will take a small project I created, analyze its components, draft up a plan for modularizing it, and execute that plan. Overview Tools used For the purposes of this project, we will be using the following tools: Project description I remember when I was young...

Jul 29, 2021
Post comments count 0
Post likes count 0

Edit Your C++ Code while Debugging with Hot Reload in Visual Studio 2022

David Li

In Visual Studio 2022 Preview 2, we are happy to announce that Hot Reload is now supported for C++. Hot Reload for C++, powered by Edit and Continue, is a new way of editing your code during debugging.

Jul 28, 2021
Post comments count 11
Post likes count 0

Visual Studio Code C++ July 2021 Update: Disassembly View, Macro Expansion and Windows ARM64 Debugging

Julia Reid

The July 2021 update of the C++ extension for Visual Studio Code is here, bringing you brand new features— such as a Disassembly View while debugging, inline macro expansions, and debug support for Windows ARM64 architecture—along with a bunch of enhancements and bug fixes. To find out more about all the enhancements, check out our release notes on GitHub. Disassembly View We’re excited to announce that Disassembly View— our #1 upvoted GitHub issue (#206)— is publicly available in VS Code Insiders! Disassembly View allows you to debug assembly code corresponding to the instructions created by your compiler. It’...

Jul 21, 2021
Post comments count 3
Post likes count 0

Using C++ Modules in MSVC from the Command Line Part 1: Primary Module Interfaces

Cameron DaCamara

In this three-part series we will explore how to build modules and header units from the command line as well as how to use/reference them. The goal of this post is to serve as a brief tour of compiling and using primary module interfaces from the command line and the options we use. Note: This tutorial will focus primarily on dealing with IFC and object file output. Other types of compiler output such as PDB info are not mentioned. Overview Summary of C++ modules options Basics of building a module interface For the content in this section, we will assume that you have an appropriate ...

Jul 14, 2021
Post comments count 0
Post likes count 1

Build and Debug C++ with WSL 2 Distributions and Visual Studio 2022

Erika Sweet

Visual Studio 2022 introduces a native WSL 2 toolset for C++ development. This toolset is available now in Visual Studio 2022 version 17.0 Preview 2. WSL 2 is the new, recommended version of the Windows Subsystem for Linux (WSL) architecture that provides better Linux file system performance, GUI support, and full system call compatibility. Visual Studio’s WSL 2 toolset allows you to build and debug C++ code on WSL 2 distros from Visual Studio without ever adding an SSH connection. You can already build and debug C++ code on WSL 1 distros using the native WSL 1 toolset introduced in Visual Studio 2019 version 1...

Jul 7, 2021
Post comments count 2
Post likes count 0

Code Scanning C++ with GitHub Actions

Nick Uhlenhuth

Last year, GitHub released code scanning, which enables developers to incorporate security checks into their CI/CD environment and developer workflow. This post demonstrates the basics of using CodeQL, the analysis engine behind code scanning, with GitHub Actions. What is CodeQL? CodeQL is an analysis engine that automates security checks by running queries against a database generated from your codebase. This CodeQL database is created during the build process and represents the source code in relational form. By default, code scanning runs standard CodeQL queries written by GitHub researchers and the communit...

Jun 30, 2021
Post comments count 7
Post likes count 0

Customized Warning Levels and Code Analysis for External Headers

Will Buik

If you have tried to keep your code clean by selecting strict compiler warning levels or code analysis rulesets, you likely know how frustrating it can be to see these warnings for headers that are not part of your project. To alleviate this, we’ve made it easy to mark headers as external to your project in the latest preview Visual Studio 2019. This is something we have been working on for a while with help and feedback from the community. Some of you may remember our previous post, Broken Warnings Theory, when we added experimental external header support to the Microsoft C++ Compiler. I’m happy to announce tha...

Jun 23, 2021
Post comments count 6
Post likes count 0

STL Visualizers on GitHub

Anju Del Moral Gonzalez

We are happy to announce that now it’s possible to contribute to the STL Visualizers for Visual Studio's debugger on GitHub. A visualizer is a file with .natvis extension that allows you to manipulate the way native types appear in the debugger's watch window.  We've been working on fixing existing issues with the visualizers and augmenting them, but with C++20 coming with new types, they have been falling behind. We decided to open source them so that the community can benefit and collaborate.   What’s Available?   The file is now in the GitHub repo under stl\debugger\STL.natvis. We also have...