

.jpg)
Press F5 to run the app to your second breakpoint.Īt this point, you can begin to analyze the data. While the debugger is paused at the first breakpoint, choose Take snapshot on the Memory Usage summary toolbar. Run the scenario that will cause your first breakpoint to be hit. To create a baseline for memory comparisons, consider taking a snapshot at the start of your debugging session. Performing those actions while your app is running can eliminate the noise from the code that doesn't interest you and can significantly reduce the amount of time it takes you to diagnose an issue. Setting breakpoints, stepping, Break All, and other debugger actions can help you focus your performance investigations on the code paths that are most relevant. For more information, see Run profiling tools with or without the debugger.Īlthough you can collect memory snapshots at any time in the Memory Usage tool, you can use the Visual Studio debugger to control how your application executes while investigating performance issues. You can also analyze memory usage without a debugger attached or by targeting a running app. The Memory Usage tool lets you take one or more snapshots of the managed and native memory heap to help understand the memory usage impact of object types.

Find memory leaks and inefficient memory while you're debugging with the debugger-integrated Memory Usage diagnostic tool.
