Microsoft Dev Blogs

Next-Gen Code Coverage in Visual Studio: Enhanced C++ Support and Security

thumbnail

Table of Contents

Introducing Microsoft.CodeCoverage.Console

The new Microsoft.CodeCoverage.Console tool in Visual Studio allows for collecting code coverage for console applications, merging coverage reports, and instrumenting binaries. It extends the functionality of dotnet-coverage to support C++ code coverage and provides enhanced security features. It is available in Visual Studio Enterprise through Developer PowerShell. Examples of its usage and detailed documentation can be found in Scenario 09 for C++ Code Coverage for Console Apps in Developer PowerShell.

Enhanced Security Features

Visual Studio now includes enhanced security features for code coverage. These features enable the collection of code coverage for web applications running in IIS, supporting both .NET and C++ binaries. The new capabilities include controlling access to data passed through named pipes and shared memory, ensuring a secure process of measuring code coverage.

Summary

The latest updates in Visual Studio's code coverage components have brought significant improvements. The C++ code coverage support has been completely rewritten, introducing support for ARM64 methods. The introduction of the Microsoft.CodeCoverage.Console tool enhances code coverage capabilities, while the addition of new security features ensures a more secure data collection process. These updates aim to provide a faster, more reliable, and secure code coverage measurement experience for developers working on C++ projects.Feedback is welcome from users to help further improve Visual Studio, and can be shared through Developer Community for bug reports, suggestions, and feature requests. Follow the Visual Studio team on various platforms such as YouTube, Twitter, LinkedIn, Twitch, and Microsoft Learn for the latest updates.