views:

72

answers:

3

I am using a .NET app written by someone else, and I can see that's its refreshing very slowly today. Using Process Explorer, I see that its throwing thousands and thousands of exceptions (which are presumably being caught somehow by the app).

Is there any way to see what type of exceptions these are if I don't have access to the source code? Process Explorer only has a "# of Exceps Thrown" counter. But is there any tool out there that could tell me?

A: 

I believe you can use windbg to capture a memory dump and analyze it in order to find these exceptions.

I do not have experience with it myself, and using it may cause the app to go offline.

Oded
Can the downvote please explain?
Oded
+3  A: 

Attach the debugger to the process and you should be able to tell what the exceptions are - just not where they came from in the source code.

Make sure the exceptions settings are set appropriately. Even without this, you can always see first-chance exceptions that are caught and ignored by the app in the Output window. It's possible this is a legitimate but ill-advised "handle error by throwing" codepath that the app hits.

If you don't have debug access to the machine then Process Dumper can be installed and produce a full or minidump from the target process (by .EXE filename) on selected or all exceptions. I don't think this works with managed exceptions, though. The debugger will work with both managed and native exceptions.

Steve Townsend
Thanks a lot. This definitely looks like the right way to go. It stopped throwing them before I could get this up. But will try this if I see the slowness again.
Michael Covelli
A: 

This could be done via the Profiling API. There is an entire API dedicated to tracking and handling exceptions.

Reed Copsey