5 Ways To Generate A MiniDump


If you've ever developed applications for Windows you've almost certainly come across application crash dumps, or their lighter counterparts the mini dumps. As the name suggests, the mini-dump is a smaller alternative to a full crash dump file, containing just enough (in most cases) information to help developers perform basic debugging operations to determine the cause of a failure in an application. Because they're small and efficient to generate they are perfect candidates for sending over the internet back to the developers.

So it follows that as a developer you need to be aware of how to generate such mini dump files.

Here is a list of the various ways mini-dumps can be generated on Windows 7 and newer operating systems

  1. Task Manager / Process Explorer

    Using the task manger, switch to the Applications or the Processes tab and right-click on a process and select the "Create Dump File.." option. This will trigger the mini dump generation process and when complete, a notification dialog box will inform you of the location where the dump was saved.

    The Task Manager generates full memory mini-dumps, so if your application uses a lot of memory the file might get big!

    An alternative to the classic Task Manager is the wonderful Process Explorer utility. Most developers already use this and the interface is relatively similar to Task Manager. Right-click a process and select the option to create a mini dump, or a full memory mini dump.

  2. The MiniDumpWriteDump API

    Of course, if you're a developer, you may want to add functionality to your own software to generate mini-dumps. The function that actually triggers the process is aptly called MiniDumpWriteDump and you can read all about is on MSDN.

  3. Visual Studio (2010 and newer)

    The debugging tool-belt in Visual Studio has been augmented with the "Save Dump as.." option since Visual Studio 2010. This may come in handy while debugging but usually if you are debugging your application with Visual Studio chances are you don't really need to store that mini dump.

    That said, Visual Studio does include new abilities to explore mini-dumps created using any of the methods outlined here, and in particular some really handy tools for debugging managed code.

  4. Windows Error Reporting (WER) And Related APIs

    Windows Error Reporting (WER) is a set of Windows technologies that capture software crash and hang data from end users. When an application crashes on an end-user's computer, the Windows Error Reporting (WER) framework generates a mini-dump and these dumps are sent to Microsoft if the user chooses to send the error report to Microsoft. As a developer you can sign up for Windows Error Reporting and you too can get access to these failure reports.

  5. WinDBG, ProcDump, or DebugDiag

    It wouldn't be fair not to mention these popular Windows debugging tools. And they too include options to generate mini-dumps: WinDbg, ProcDump and DebugDiag.

You've Created the Mini-Dumps, Now What?

It's abundantly clear that there is no shortage of ways to generate mini-dumps on modern version of Windows. This is great. But once you have the mini-dump what do you do with it?

If you're new to WinDbg, Volker von Einem has an excellent blog with lots of useful tips and tricks to get you started analyzing those mini-dumps with WinDbg. The information is a bit dated but nonetheless very useful!

If you're going to be working with mini-dumps you might as well familiarize yourself with the various kinds of mini dumps available and what the different options mean. A great place to start is DebugInfo.com's EFFECTIVE MINIDUMPS

Finally, some other useful resources on the web:

is the founder of Donaq, a software development consulting company with a focus on mobility. You can find Mike on Google+ and on LinkedIn.
Design copyright (c) Miky Dinescu