Skip to content

Commit 4f56a43

Browse files
committed
Clarify scenarios for running profiling tools in debug or release builds
1 parent 2e32c7a commit 4f56a43

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

docs/profiling/running-profiling-tools-with-or-without-the-debugger.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,33 @@
11
---
2-
title: "Run profiling tools with or without the debugger"
3-
description: Explore the differences between running profiling tools for your applications in Visual Studio with or without the debugger.
4-
ms.date: "11/09/2023"
2+
title: "Run profiling tools on release or debug builds"
3+
description: Explore the differences between running profiling tools for your applications in Visual Studio on release or debug builds.
4+
ms.date: "01/06/2024"
55
ms.topic: "conceptual"
66
author: "mikejo5000"
77
ms.author: "mikejo"
88
manager: mijacobs
99
ms.subservice: debug-diagnostics
1010
---
11-
# Run profiling tools with or without the debugger (C#, Visual Basic, C++, F#)
11+
# Run profiling tools on release or debug builds (C#, Visual Basic, C++, F#)
1212

13-
Visual Studio offers a choice of performance measurement and profiling tools. Some tools, like CPU Usage and Memory Usage, can run with or without the debugger, and on release or debug build configurations. Tools that appear in the [Diagnostics Tools window](../profiling/profiling-feature-tour.md#measure-performance-while-debugging) run only during a debugging session. Tools that appear in the [Performance Profiler](../profiling/profiling-feature-tour.md#post_mortem) run without the debugger and you analyze the results after you choose to stop and collect data (for post-mortem analysis).
13+
Visual Studio offers a choice of performance measurement and profiling tools. Some tools, like CPU Usage and Memory Usage, can run either on release builds or while debugging your app. Tools that appear in the [Diagnostics Tools window](../profiling/profiling-feature-tour.md#measure-performance-while-debugging) run only during a debugging session using a debug build. Tools that appear in the [Performance Profiler](../profiling/profiling-feature-tour.md#post_mortem) run without the debugger, typically on release builds, and you analyze the results after you choose to stop and collect data (for post-mortem analysis).
1414

15-
>[!NOTE]
16-
>You can use the non-debugger performance tools with Windows 7 and later. Windows 8 or later is required to run the debugger-integrated profiling tools.
17-
18-
The non-debugger Performance Profiler and the debugger-integrated Diagnostic Tools provide different information and experiences. Debugger-integrated tools show you variable values and let you use breakpoints. Non-debugger tools give you results closer to the end-user experience.
15+
The Performance Profiler and the debugger-integrated Diagnostic Tools provide different information and experiences. While using the Diagnostic Tools, the debugger shows you variable values and lets you use breakpoints.
1916

20-
To decide which tools and results to use, consider the following options:
17+
Release build performance numbers in the Performance Profiler are the most precise and accurate. These tools give you results closer to the end-user experience. Typically, this is the preferred method for using the profiling tools. However, there may be scenarios where using the debugger in a debug build may help to narrow down the performance problem, especially if you want to use debugger features such as breakpoints and code stepping.
2118

22-
- Debugger-integrated tool vs. non-debugger tool
23-
- External performance problems, like file I/O or network responsiveness issues, won't look much different in the debugger or non-debugger tools.
24-
- The debugger itself changes performance times, as it does necessary debugger operations like intercepting exception and module load events.
25-
- Release build performance numbers in the Performance Profiler are the most precise and accurate. Debugger-integrated tool results are most useful to compare with other debugging-related measurements, or to use debugger features.
26-
- Some tools, such as the .NET Object Allocation tool, are only available for non-debugger scenarios.
19+
To help you decide between using the profiling tools in release or debug builds, you might also consider the following:
2720

28-
- Debug vs. release build
29-
- For problems caused by CPU-intensive calls, there might be considerable performance differences between release and debug builds. Check to see whether the issue exists in release builds.
30-
- If the problem occurs only during debug builds, you probably don't need to run the non-debugger tools. For release build problems, decide whether features provided by the debugger-integrated tools will help to pinpoint the problem.
31-
- Release builds provide optimizations like inlining function calls and constants, pruning unused code paths, and storing variables in ways that can't be used by the debugger. Performance numbers in the debug builds are less accurate, because debug builds lack these optimizations.
21+
- Release builds provide optimizations like inlining function calls and constants, pruning unused code paths, and storing variables in ways that can't be used by the debugger. Performance numbers in debug builds are less accurate, because debug builds lack these optimizations.
22+
- In addition to differences between release builds and debug builds, the debugger itself changes performance times, as it does necessary debugger operations like intercepting exception and module load events.
23+
- For performance problems caused by CPU-intensive calls, there might be considerable performance differences between release and debug builds. Check to see whether the CPU issue exists in release builds.
24+
- External performance problems, like file I/O or network responsiveness issues, won't look much different in a release build or a debug build.
25+
- If the problem occurs only with debug builds, you probably don't need to run the tools with release builds.
26+
- Some tools, such as the .NET Object Allocation tool, are only available in the Performance Profiler (non-debugger scenarios).
3227

33-
## Collect profiling data without debugging
28+
## Collect profiling data on release builds
3429

35-
To collect performance data without debugging, you can run the Performance Profiler tools.
30+
To collect performance data on release builds, run the Performance Profiler tools.
3631

3732
1. With a project open in Visual Studio, set the solution configuration to **Release**, and select **Local Windows Debugger** (or **Local Machine**) as the deployment target.
3833

0 commit comments

Comments
 (0)