Create dump with uncontrolled code failure?

Is there a way I can get a full crash dump when my application suddenly crashes?

The problem is that I suspect that this is due to unmanaged code that destroys the .net structure itself, and because of this, if the application is not connected to the application at the time of the crash, the application does not even get a chance to cope with the crash.

I can’t connect the debugger and wait, because the accident happens randomly, and we have a lot of installed places, so I wonder if this can be done without adding a debugger.

Edit: I am aware of the Microsoft Debugging SDK, and I also learned about DebugDiag. I would like to do this without applying to the application every time, as usual, in the middle of a sale, and I don’t have time to attach a debugger and examine the stack trace. It seems that DebugDiag allows me to configure a rule for this, but it seems to work only on already running processes, and does not wait for some process to start.

+4
source share
4 answers

You can use adplus -crash or userdump.exe .

+2
source

debugdiag is fully scriptable . When I had such problems, we would ask for specific process names and attach them automatically.

0
source

The best way is to edit the registry so that when a failure occurs, it calls the appropriate application to create a dump. Therefore, in your case, I would ask Dr. Watson to create a landfill.

See link

Basically change the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug

set values

 Value Name = Auto Type = String (REG_SZ) Data Value = 1 or 0. (Default is 1) Value Name = Debugger Type = String (REG_SZ) Data Value = drwtsn32 -p %ld -e %ld -g 

This will call Dr. Watson if your application crashes. Refer to the link in this message for more information, note that you will need to set Auto to 0 if you want Dr. to not be called in the future. Watson.

0
source

Create a generic exception handler for your program. Inside the exception handler, write code to manually dump the desired path.

This link will help http://brakertech.com/howto-c-generate-dump-file-on-crash/

0
source

All Articles