![Q & A Q & A](/blog/images/qa.webp)
![](https://cdn.coretechnologies.com/images/quotes-transparent-21x21.webp)
— Kelly @ Sabre
Hi Kelly. Sorry to hear of the trouble! Please follow these steps to automatically generate a crash dump whenever your application terminates:
Download & install Microsoft’s free ProcDump utility
ProcDump — yet another excellent utility from the Sysinternals team — easily creates a dump file from any running process. It is our tool of choice when exploring application crashes.
Download the ProcDump .Zip package and extract all files to a convenient location. We have placed the files in “C:\Apps\ProcDump” for this article.
Be sure to run ProcDump at least once and accept the Sysinternals EULA. We don’t want the utility to hang when we run it unattended as a background service!
Compose the command line to capture a crash dump when your application stops
ProcDump features an impressive set of command line options. Please review and identify the flags that work best for your situation.
For example, we use this command to dump the notepad.exe application whenever it stops running:
c:\Apps\ProcDump\procdump.exe -t notepad
Please ensure that this command works as expected. Start your application, run the command and then terminate your application. Is a dump file created? Troubleshot and fix if not.
Setup your ProcDump command as a Windows Service in AlwaysUp
Your application is running 24×7. To configure ProcDump to operate on the same schedule and capture the dump file at any time:
Start AlwaysUp and select Application > Add… to bring up the Add Application window.
On the General tab:
In the Name field, enter a suitable name for this new service. We have used “ProcDump Notepad”.
In the Application field, enter the full path to ProcDump.exe.
In the Arguments field, provide the command line options you developed in step 2. Be sure to add the -w flag, which will cause ProcDump to wait for your app to launch if necessary.
And in the Start in directory field, enter the folder where you want the dump files to be written. (Leaving this blank will cause dump files to be created in the ProcDump folder.)
On the Logon tab, specify your windows account. ProcDump should run in this account since you know it works there (and that the EULA has been accepted).
Click the Save >> button to record the ProcDump service.
And finally, start your new service (from the Application menu).
Here is what the finished setup looks like for us, with Notepad running as a service and ProcDump monitoring it (also as a service):
Test
Now that everything is in place, you should confirm that a crash dump will be created whenever your application stops.
Open the Task Manager and kill your application. Does a new dump file appear in the expected location? If not, please review all the steps and ensure that nothing was missed.
Best of luck debugging your program!