JetBrains Rider 2024.1 Help

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.

  1. Create at least two breakpoints in your code, e.g., at the beginning and at the end of the method you want to analyze.

  2. Run your application in the debug mode.

  3. After the application stops at the second breakpoint, DPA will show the time between the current and the previous breakpoint right in the editor.

    Time between breakpoints

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 Settings | Build, Execution, Deployment | Dynamic Program Analysis | Memory Allocation.

Note that this also applies to attaching the debugger to a running application with Attach to Process.

Last modified: 14 March 2024