How to create minidumps using Visual Studio, WinDbg and Exception Tracer
Minidumps can be really useful for creating a self-contained record of a crash for analysis later, either by your own software team, by a consultant, or by a software tool vendor.
In this article I’m going to show you how to create minidumps using Visual Studio, WinDbg and Exception Tracer.
Exception Tracer will allow great control over the minidump contents and automatic creation of minidumps.
Attach the Visual Studio to the application that you know will crash, then cause the operation that will cause the crash.
When the application has crashed a new option will appear on the Debug menu. Save Dump As….
The Windows save file dialog will be displayed. Choose a directory and filename to save the minidump.
Attach the WinDbg to the application that you know will crash, then cause the operation that will cause the crash.
When the application crashes type .dump /o /m path-to-minidump.dmp
The /o option ensures that the minidump gets written, overwriting any previous minidump with the same name.
You can use /ma to get more detail.
Example .dump /o /ma e:\minidumps\floating-point-crash-2023-09-12.dmp
The default settings of Exception Tracer will not create a minidump. Our first action is to configure Exception Tracer to create a minidump when an exception is thrown.
Open the Exception Tracer settings dialog.
From the Settings menu choose Edit Settings…, then go to the Minidump settings.
Select the Minidump on Exception check box, then Click OK.
Attach the Exception Tracer to the application that you know will crash. From the Debug menu choose Attach to process…, then select your process.
Once Exception Tracer is attached to your process, cause the operation that will cause the crash.
When the exception is detected a minidump will be written to the directory specified on the minidump settings.
The default location is C:\Users\<username>\AppData\Roaming\Software Verify\ExceptionTracer\MiniDumps
If you want more control over the content of the minidump open the settings dialog and go to the Minidump settings, then click Minidump flags.
Change the minidump options to Custom then select the options that you want. Click OK.
All minidumps created after this change will be saved according to the options chosen.
You’ve learned how to create minidump using Visual Studio, Windbg and Exception Tracer, and how to create custom minidump using Exception Tracer.