How to Capture a Minidump: Let Me Count the Ways

As I was waiting for a minidump I was grabbing on a very large and busy server application to finish writing, my mind wandered and I realized there were quite a few ways to grab a minidump today. Back in the old Windows days, when we had to program up hill in the snow both ways, there was only WinDBG. Now it seems like an application isn’t complete unless it produced a minidump. I thought I’d throw out all the ways I know off the top of my head. Of course, I’m sure there are other ways so please add them in the comments!

Note: I’m only using Windows 7 and Server 2008 R2 these days so some of these might not work on legacy Windows operating systems.

ADPlus/WinDBG’s .dump Command

The original heavy duty way to create a minidump. To create a full memory minidump, which you’ll need in order to work with .NET’s SOS/SOSEX/PSSCOR2 extensions or for native code to follow all memory like linked lists, use the /ma option.

Visual Studio

With Visual Studio 2010, the wonderful “Save Dump As…” menu option now appears on the Debug menu for both native and managed debugging. Any time you need a minidump while debugging, just grab one. Add in the fact that Visual Studio 2010 has the awesome minidump reading capabilities, especially for .NET code, we can now spend way less time in WinDBG.

TaskManager

Many people don’t realize that TaskManager knows all about minidumps. When you’re either in the Applications or the Processes tabs, right click on the process and select Create Dump File.

After the minidump is finished, you’ll see the dialog showing you where the dump was created. A nice hidden treat is that the path shown is a read only edit control you can select and copy so you don’t have to try to remember a long path.

You might be wondering what type of minidump TaskManager makes. How about I leave that as an exercise for the reader? OK, that’s cruel. All TaskManager created dumps are full memory minidumps.

Process Explorer

TaskManager is fine, but real developers use Process Explorer to fulfill our task management needs. Right clicking on a process lets you choose a minidump or a full memory minidump.

MiniDumpWriteDump

As I am trying to create a complete list I do need to include the Windows API that actually creates the minidumps themselves: MiniDumpWriteDump. There’s nothing stopping you from writing your own program that creates minidumps.

ProcDump

The sweet SysInternals ProcDump tool is designed to get you a minidump when specific nasty issues happen to your processes. It’s great for snagging dumps when you have intermittent CPU spikes or memory usage. I find that I’m using this tool constantly on production servers to get minidumps of those hard to reproduce problems. Everyone using computers needs to know about this tool, even your grandmother!

DebugDiag

Got IIS problems? DebugDiag is for you. The ability to script when the dump occurs is pretty interesting. The always brilliant Tess Ferrandez has a great blog post that helps you to decide when you should use ADPlus/WinDBG vs. DebugDiag that’s worth reading.

Windows Error Reporting (WER)

If your company signs up for Windows Error Reporting you’ll get the same minidumps Microsoft gets. For native developers, WER is a wonderful resource but for .NET developers you only get basic minidumps so it’s not as useful.

Do you know of any other ways to capture a minidump?

Managed OS management and monitoring.

Production Cloud environments often demand unique performance and security controls to ensure reliable operations. Atmosera’s managed services provide management and monitoring of the Virtual Machines (VMs) and OSes deployed on them. The service includes the initial operating system build, agent installation (if applicable) and configuration of OS level backups. OS configuration changes can be made upon request and customers benefit from OS upgrades.

There are three tiers of services to meet specific customer requirements at the OS level.

Service Overview

No matter which service level you choose, OS Management delivers 24x7x365 monitoring and day-to-day management of server OS environments hosted with Atmosera. This includes reliable patching, anti-virus scanning, proactive monitoring and prescribed escalations.

  • Enables customers to choose the level of management required — and to control costs
  • Charged on a monthly basis per server
  • All servers within an environment must be managed at the same level
  • Premium-level service allows ongoing customization within all categories

We deliver solutions that accelerate the value of Azure.

Ready to experience the full power of Microsoft Azure?

Start Today

Blog Home

Stay Connected

Upcoming Events

All Events