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'
  3. Press 'Next'
  4. Select 'A specific process'
  5. Select your Process / Application Pool / Service
  6. Advanced Configuration (Optional)
    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...'
  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
  10. Press 'OK'
  11. 'Save and Close'
  12. Press 'Next'  
  13. Name the rule and Select folder where the dump should be stored
  14. Press 'Next'
  15. 'Activate the rule now'
  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'
  3. Press 'Next'
  4. Select 'Performance Counters'
  5. Press 'Next'
  6. Click 'Add Perf Triggers...'
  7. Under Add Counters select the performance indicators and their targets

    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...
  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.
  11. Press 'OK'
  12. Press 'Next'
  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.
  14. In our case we will be targeting the AppPool
  15. Press 'OK'
  16. Press 'Next'
  17. Configure UserDump Series according to your debugging needs
  18. Name the rule and Select folder where the dump should be stored
  19. Press 'Next'
  20. 'Activate the rule now'
  21. Press 'Finish'
  22. Keep DebugDiag Collection Open
  23. Run the flow that replicates the issue
  24. Collect the Dump