ADPlus from the Debugging Tools can be used to get Crash Dumps.
ADPlus is a command-line VBScript file which runs a debugger with best-case switches in order to produce a dump file. In a nutshell, the dump file contains the application as it was running at the time the dump file was created. In the case of a crash dump, ADPlus will be used to have a dump file created the problem application crashes due to a second chance exception (an uncaught exception).
To use ADPlus, you must install the Debugging SDK. ADPlus needs to be run from a command prompt running under and local administrator account with elevated privileges. If you fail to do this, the dump file may not be created.
Install the Debugging SDK to get Adplus:
1. Go to http://www.microsoft.com/whdc/devtools/debugging/default.mspx and download the debugging tools to match the version of Windows of the machine where the program is running and the processor type (32bit or 64bit) of the application for which the dump is going to be taken.
2. Install the tools on the machine where you are running the application that is crashing.
Steps to get Crash Dump:
Crash dumps are taken by connecting to a running application using a debugger and having the debugger creates a dump file - ADPlus automates this operation.
1. After the install, in the directory where you installed the tools, there should be a script name "adplus.vbs". Open a command prompt and navigate to the directory where this file is installed.
2. Start the application you are trying to debug.
3. Run the script with the following syntax:
a) By process name.
cscript adplus.vbs -crash -pn <process name> -quiet
Note: So for instance if you had notepad.exe running and you wanted to dump it, the syntax would be: cscript adplus.vbs -crash -pn notepad.exe –quiet
b) By Process ID:
cscript adplus.vbs -crash -p <process id> -quiet
Note: You can get the process ID from Windows Task Manager or tlist (in the debuggers directory).
c) By launching the application:
cscript adplus.vbs -crash -sc <executable file> -quiet
Note: <executable file> is the file path and name of the executable.
4. Wait for the crash to occur.
5. A directory will be created in the same directory as the script file. You'll know it when you see it. It will be a very long folder name. Zip this folder up naming the zip file as your case number which is in the subject of this email.
Note: Once the crash occurs, you must restart the process. COM+ and MTS apps will automatically restart when their component is called.
About the dump file:
The dump file will be created in a sub-folder under where ADPlus is being run. The name of this folder will contain the type of dump taken (Crash or Hang) and the date the dump was taken. This folder will contain several files. When you look at the dump file, you will see it has a very long name and ends with .dmp.
The name of the crash dump file should be checked to be sure it looks correct:
Application name This is the name of the application for which the dump was taken.
Partial Error message:
"1st_chance" This means the dump was taken during a caught exception (ie first chance).
"2nd_chance" This shows that the dump was taken 2nd chance exception - which is what we want to see for a crash dump.
Note: There are countless variations, the main thing is that the error message you see should tie back to what you would be expecting. The main thing is that you see 2nd_chance" noted in the filename for a crash dump.
Type of error The filename should contain a partial error description, so you know which exception the 2nd chance exception was thrown for.
For more information on ADPlus:
How to use ADPlus to troubleshoot "hangs" and "crashes"