tags:

views:

184

answers:

1

I work on a legacy MMC application and one thing I have noticed is that once in awhile when closing the MMC, an error will be reported.

"MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC".

How can I debug this? The error is not displayd until you close the console and if you try to attach a debugger, it just exits instantly.

Any thoughts?

+3  A: 

Why not run the MMC under debugger? Clearly there is something wrong (Unhandled exception probably) with the shutdown code of the snapin.

Just run mmc.exe under your favorite debugger and tell the debugger to stop on all exception. attach your snapin exit and wait for the crash.


You can try to run ProcDump which can create dump files on Unhandled exception.

Shay Erlichmen
The problem is that it is not very reproducible and attaching the debugger to the console takes ~2 minutes. Its just not very convenient to do this while trying to reproduce the issue. It would be better to reproduce the issue then attach the debugger, but as I stated at this point it just exits the application.
Zenox