Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinDbg to create dump file upon crash?

We're having an exception with our application. Using Dr.Watson we didn't capture any dmp as well log files. I'm told, WinDbg is an alternative to create dump files upon exceptionn/crash of a program. After a googling, I come across a piles of confusion. First of all, I'd like to confirm, whether it is possible, to creat dump files with help of WinDbg. Second, is there any recommended simple command lines to attach WinDbg to an application to get the dump files upon its crash? Thanks alot!

like image 673
user1154138 Avatar asked Dec 20 '22 21:12

user1154138


1 Answers

In this situation we usually recommend to our users to download procdump (which can just be extracted from the zip file, no installation required) and then we give them a batch file that contains something like this:

mkdir c:\dumps
procdump -e -c 10 -w myprocess.exe c:\dumps

When the process generates an unhandled exception it will create a dump file in the c:\dumps directory that you can load into Visual Studio or Windbg (the !analyze -v command is your friend)

like image 166
the_mandrill Avatar answered Dec 26 '22 21:12

the_mandrill