views:

60

answers:

3

Do you know if there is a tool in Windows that is able to start a C++ application and, when there is an exception, is able to automatically save to file the stack trace information?

I now that there is the dbghelp.dll and StackWalk64 function but I would like rather to use some tool instead of coding myself.

Right now I am also looking at WinDebug . I found here that hen there is a crash, giving the following commands it prints out tons of diagnostic information, including off course the stack trace.

|* ~* kp
|* !analyze -v -f
|* lm

I am figuring out whether WinDebug can be automated but I would rather use some tool more simple to get just the stack trace. Can you help me?

+1  A: 

Use Visual studio 2010 express edition from Microsoft Site. It has a pretty nice debugger.

It is free as well!!.

I am not sure if it can automatically save to file though. That may require automation.

Chubsdad
A: 

You can use the system's Dr.Watson(drwtsn32) to create a dump you can later use with windebug.

Hasturkun
Thanks! I will have a look!
A: 

There is a nice article with code sample here.

tibur