How to generate application dumps using Debug Diag

How to generate application dumps using Debug Diag for Crashes / Performance Triggers ?

Memory Dump Files (.dmp files) are a snapshot of a program’s memory at a given time. With a dump file, you can see the current executing lines of code, the values of local values and values of all the heap objects. In other words, a dump file represents the entire state of the program at the point it was captured.

Dumps are usually used to debug crashes (Crash Dumps), but there are other uses as well. From most common to least they are:

  • Debug crashed programs
  • Debug hung programs
  • Find memory leaks
  • Debugging on a different machine or at a different time
  • Debug programs that can’t be attached with a debugger

Installing Debug Diag:

Download DebugDiag - from here and install it on the machine

Generating a Crash Dump for a Process / Application

  1. Run DebugDiag Collection
  2. In the Wizard select 'Crash'
    1.png
  3. Press 'Next'
  4. Select 'A specific process'
    2.png
  5. Select your Process / Application Pool / Service
    3.png
  6. Advanced Configuration (Optional)
    4.png
    1. Unconfigured First Chance Exceptions - Provide instructions on what to do if the process hits an Exception different from the one configured in our rules. We will leave it blank
    2. Action limit for unconfigured First Chance Exceptions - How many actions are executed upon the Exception
    3. Maximum number of userdumps created by this rule - Number of dumps generated before rule is inactive
  7. Click 'Advanced Settings > Exceptions...'
  8. 'Add Exception...'
    5.png
  9. In the Configure Exception add your Exception from the crash event in EventViewer along with what action should be done and how many times
    6.png
  10. Press 'OK'
  11. 'Save and Close'
    7.png
  12. Press 'Next'
  13. Name the rule and Select folder where the dump should be stored
    8.png
  14. Press 'Next'
  15. 'Activate the rule now'
    9.png
  16. Press 'Finish'
  17. Keep DebugDiag Collection Open
  18. Run the flow that replicates the issue
  19. Collect the Dump

Generating a User Dump for an IIS process once performance indicators are exceeded (For example % of 500 exceptions)

  1. Run DebugDiag Collection
  2. In the Wizard select 'Performance'
    10.png
  3. Press 'Next'
  4. Select 'Performance Counters'
    11.png
  5. Press 'Next'
  6. Click 'Add Perf Triggers...'
    12.png
  7. Under Add Counters select the performance indicators and their targets
    13.png
    For example we will be targeting the UiPath_Orchestrator instance and using the W3SVC_W3WP > % 500 HTTP Response Sent because we want to trigger it when the server starts pushing more than a specific amount of 500s.
  8. Press 'OK'
  9. Click the newly added counter and press Edit Thresholds...
    14.png
  10. In the properties add the specifics of what the faulty behavior would be. For example a 10% percentage of 500 during 2 minutes is considered faulty here.
    Remember to baseline against normal operation.
    15.png
  11. Press 'OK'
  12. Press 'Next'
    16.png
  13. In the Select Dump Targets target the process whose dump we will be taking. For example we could measure the performance of another app to target a dump of the Orchestrator.
    17.png
  14. In our case we will be targeting the AppPool
    18.png
  15. Press 'OK'
  16. Press 'Next'
  17. Configure UserDump Series according to your debugging needs
    19.png
  18. Name the rule and Select folder where the dump should be stored
    20.png
  19. Press 'Next'
  20. 'Activate the rule now'
    21.png
  21. Press 'Finish'
  22. Keep DebugDiag Collection Open
  23. Run the flow that replicates the issue
  24. Collect the Dump