This cli tool is able to generate minidump of living app in three mode: full, minimal and heap. heap is really interesting because:
“dumps generated by the heap mode can be 5x or 10x smaller than full memory dumps, but will still allow complete investigation of many .NET issues by tools like Visual Studio and WinDbg (SOS)”
Moreover, mini dump generation is located into an external library: DumpWriter. This library can be integrated into any program to add mini dump generation capability.
Generating a minidump is technically easy. You call MiniDumpWriteDump with a MINIDUMP_TYPE parameter to choose wich memory ranges to gather or use a CallbackParam to manually filter memory ranges. But choosing the right one is a complicated process. Other posts are related on how memory ranges are choosen to be saved in heap mode :
- Creating Smaller, But Still Usable, Dumps of .NET Applications
- More on MiniDumper: Getting the Right Memory Pages for .NET Analysis