KBEA-00145 - Debugging Applications on Windows Using Minidump Files

Article ID:360032824252
2 minute readKnowledge base


All Electric Cloud binaries are designed to automatically generate a stack trace minidump if they encounter an unexpected exception. The program will generate a program .dmp file next to the program .exe file. You can instruct the application to generate a full minidump instead of a stack-only minidump by creating/setting the registry key program and setting the dumpType value for it:

HKLM\Software\Electric Cloud\'program':dumpType (dword)

The dword is a bitmask of MINIDUMP_TYPE values:
0 = stack only (default)
1 = stack and global vars
2 = full memory
4 = handle data

Here’s an example of how to enable full memory dumps with vars for the eMake and/or Apache programs:

Create new registry key for emake

HKLM\Software\Electric Cloud\emake


Create new registry key for Apache

HKLM\Software\Electric Cloud\Apache

Then create new DWORD value for the new key

set value of dumpType = 3 (1 for vars + 2 for full memory = 3)


Forcing a Minidump

If you have a hung process (e.g., agent or eMake), you can generate a minidump file by attaching to the process with the Visual Studio .NET debugger:

  1. Start devenv.

  2. Select Debug  Processes…​

  3. Find your process in the list then select Attach…​

  4. Wait for it to finish loading symbols, then select Break

  5. Close the process window.

  6. Select Debug  Save Dump As…​

  7. Enter a file name.

  8. Change the type field to Minidump with Heap (.dmp)*

  9. Hit Save

You now have a .dmp file on disk that contains the full memory image of the process.

Generating a Minidump at a Customer Site

The following procedure allows you to generate a full memory dump of any running process on a Windows host without having to start Visual Studio or stopping the running program:

  1. Download the dumpit.zip file.

  2. Unzip the files into a directory on the machine.

  3. Start a command shell and cd to the directory.

  4. Run the command:

      cdb /pv /pn processName /c ".dump /mf mydump.dmp; qq"

If you’re attaching to an agent on a machine with more than one agent.exe running, use the process id instead of name:

cdb /pv /p pid /c ".dump /mf mydump.dmp; qq"

You can ignore the verbose and scary looking warnings that are generated by the debugger. This procedure should generate a file called mydump.dmp in the current directory containing a full memory image of the process. The process should continue running without a hitch. If there is more than one process with the same name, you can replace /pn with /p and specify a pid instead.

Applies to

  • Product versions: All

  • OS versions: Windows