Introduction:
SmartDump is a flexible command line utility to capture exception logs and memory dump files against a target process based on user specified settings like filter strings or memory addresses of breakpoints. This tool also focuses on addressing several scenarios that we cannot utilize some well-known and most widely used debugging tools, for example:
1. iDNA Trace(TTT/TTD) cannot be used within Kudu console or RDP for Azure Web Sites related debugging scenarios.
2. Debug Diagnostic Tool(DebugDiag) cannot be installed and used for Kudu console or RDP as well.
3. Procdump works with Kudu but may not successfully capture managed exceptions against web hosts with .Net Core runtime.
4. For intermittent issues, capturing iDNA Trace(TTT/TTD) may not be an appropriate approach even with selective recording.
Currently SmartDump is still under development. New features are continuously being added.
Bug reports, suggestions and feedback from you will be very much appreciated.
New feature:
New feature in release 1.13.
Support new argument:
-exit Dettach and exit a SmartDump instance with pid specified with -p . This is useful in situations that Ctrl-C or Ctrl-Break doesn't work.
Another way is to create a config.ini file in the same path of SmartDump.exe. Create a [Runtime] section and set Exit = 1, i.e:
[Runtime]
Exit=1
(This works well in more specific cases like Kudu console.)
Support of .Net 6 has been added in release 1.12.
Now -v option can real-time display manage callstack when a .net exception is thrown. Moreover using function name as filter to capture memory dump is supported.
(NOTE: this feature is only available on 32bit version currently and hasn't been added into 64bit version.

How to Use:
Below is a detailed step-to-step demo.
- First of all, we need to open Kudu console and drag/upload the tool into the site folder.

-
Next, we need to find the PID of our site’s w3wp.exe from Process Explorer.
NOTE: the one with (scm) is for Kudu console. Hence we always have to focus on w3wp.exe without (scm).

-