DPA during Debugging
DPA can provide helpful insights into your application's behavior not only during regular run but also during debugging.
Evaluate time between breakpoints
If DPA is enabled, it will automatically evaluate the time between debug breakpoints. You can use this feature to analyze code execution time expressly without running a separate profiling session.
Create at least two breakpoints in your code, e.g., at the beginning and at the end of the method you want to analyze.
Run your application in the debug mode.
After the application stops at the second breakpoint, DPA will show the time between the current and the previous breakpoint right in the editor.
Debugging and memory allocation analysis
During debugging, system assemblies used by your application provide additional data to the debugger. As a result, these assemblies allocate more memory compared to a regular application run. Currently, DPA can't distinguish these additional allocations from regular allocations made by your program. This might result in false-positive memory allocation issues detected by DPA.
Because of this, you might want to disable memory allocation analysis when you debug your solution. To do this, turn off the Analyze memory allocation during debugging option in .
Note that this also applies to attaching the debugger to a running application with Attach to Process.