For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Profiling and diagnostics tools help you diagnose memory and CPU usage and other application-level issues. With these tools, you can accumulate data (such as variable values, function calls, and events) over the time you run your application in the debugger. You can view the state of your application at different points during the execution of your code.
Check out the summary at the bottom to see what tools are available for your project type (for example, desktop, UWP, ASP.NET).
You can access the profiling tools by using Debug / Windows / Show Diagnostic Tools to use the tools during your debug session, or by using Debug / Performance Profiler... to do a focused performance analysis. See Running Profiling Tools With or Without the Debugger for more information on the different approaches.
See What's New in Profiling Tools to learn about new features for this release.
The following sections describe the different performance tools that are available in Visual Studio.
Find memory leaks and inefficient memory while you’re debugging with the Memory Usage tool. The tool lets you take snapshots of the managed and native memory heap. You can use this tool with desktop apps, Windows Universal apps, and ASP.NET apps. The Memory Usage tool can be run from the Diagnostics Tools window while you are debugging (Debug / Windows / Show Diagnostic Tools) or outside the debugger (Debug / Performance Profiler...). See Memory Usage and Memory Usage without Debugging for more information.
The Performance Explorer (Debug / Profiler / Performance Explorer) allows you to use many different tools, including CPU Sampling, Instrumentation, .NET Memory Allocation, and Resource Contention. You can use Performance Explorer tools with desktop apps and ASP.NET apps, but not Windows Universal apps. For more information, see Performance Explorer.
Use the GPU Usage tool to better understand the high-level hardware utilization of your Direct3D app. You can use this tool with both desktop and Windows Universal apps, but not ASP.NET apps. The GPU Usage tool can be run from the Diagnostic Tools window while you are debugging (Debug / Show Diagnostic Tools) or outside the debugger (Debug / Performance Profiler...).
The Application Timeline tool helps improve the performance of XAML applications by providing a detailed view of their resource consumption. You can use the Application Timeline with desktop and Windows Universal apps, but not ASP.NET apps. The Application Timeline tool can be run from the Diagnostics Tools window (Debug / Performance Profiler...).
When the debugger stops execution at a breakpoint or stepping operation, the elapsed time between the break and the previous breakpoint appears as a tip in the editor window. These PerfTips help you to monitor and analyze the performance of your app while you are debugging. You can see PerfTips in desktop, Windows Universal, and ASP.NET apps.
The HTML UI responsiveness tool helps you isolate performance problems in your apps, including lack of responsiveness, slow loading time, and visual updates that are less frequent than expected. You can use this tool with Windows Universal HTML apps. The HTML UI Responsiveness tool can be run from the Diagnostics Tools window (Debug / Performance Profiler...).
IntelliTrace lets you record specific events, examine data in the Locals window during debugger events and function calls, and debug errors that are hard to reproduce. IntelliTrace is primarily a debugging tool, but it also provides information that can be used for performance investigations. You can use this tool in Visual Studio Enterprise only, with desktop, Windows Universal, and ASP.NET C# apps. You can find IntelliTrace in the Diagnostics Tools window while you are debugging (Debug / Windows / Show Diagnostic Tools).
The recommended approach to profiling in production is to profile from the command line using vsperf.exe to collect a CPU Profile. For remote profiling support in Azure App Service, you can profile through the Server Explorer or Kudu Portal.
Here is a table that lists the different tools Visual Studio offers and the different project types you can use them with:
|Performance Tool||Windows desktop||Windows Universal/Store||ASP.NET|
|CPU Usage||yes||yes||Azure App Service only|
|PerfTips||yes||yes for XAML, no for HTML||no|
|IntelliTrace||.NET Enterprise only||.NET Enterprise only||.NET Enterprise only|
|HTML UI responsiveness||no||yes for HTML, no for XAML||no|