ASP.NET Tips: How to capture a dump

There are multiple ways to capture a dump.  There are some examples discussed in my previous post, HOWTO- Capture a dump on a specific managed exception.  You can just use DebugDiag to capture a dump.  The easiest way in DebugDiag is to just click on the Processes tab, find the process you want to get a dump for:

DebugDiag

Then right-click on the process and choose Create Full Userdump.

Another method is to use adplus.  It is installed with the debugger package.  You can they just pass the Process ID (PID) to adplus from a command line.  For instance, to get an immediate dump, you can put:

adplus -hang -p "process id"

If you are using Vista or Windows Server 2008, you can also just use Task Manager.  When you click on the process tab:

TaskMan

You can then right-click on the process and choose Create Dump File.

Depending on the situation, there are other ways to get a dump.  For example, you can use Windows Error Reporting (WER).

kick it on DotNetKicks.com

Published 06 April 08 10:44 by Tom

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# DotNetKicks.com said on April 6, 2008 10:45 AM:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# molotov said on April 6, 2008 1:04 PM:

Pre-Vista systems also have Dr. Watson:

drwtsn32.exe  -p <pid>

Of course, this has the nasty side-effect of terminating the target process...  ;-)

# Tom said on April 6, 2008 7:57 PM:

Very true.  It just is easier in the newer versions since you can do it directly from Task Manager.  There are many other ways to collect a dump, like using windbg for example.

# molotov said on April 6, 2008 8:07 PM:

> There are many other ways to collect a dump, like using windbg for example. <

Sure.  In earlier OS's, drwtsn32.exe is about the only thing that came with the OS (that I am aware of) that could get you a dump, without already having additional software installed or installing it and then hoping to recreate the problem.  And, if a customer won't let you install any software on their systems (but is OK with you taking down the process :-O )...

So, it is indeed a good thing that it is easier to capture dumps with in-built tools...

# Tom said on April 6, 2008 10:08 PM:

The other great thing is WER.  Since it can upload the dump to Microsoft and we can analyze it to see if it is a known issue.  If it is, we can refer you to the fix right away.

It is also a great way to let Microsoft know about any problems you are experiencing in our software.

# Josh Coswell said on April 7, 2008 5:22 PM:

This is more insightful then I used to think about exceptions.

Josh Coswell

http://riverasp.net

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

Search

This Blog

Syndication

Page view tracker