How to get rid of exceptions thrown by the .NET Framework

Posted by Hans Løken on Stack Overflow See other posts from Stack Overflow or by Hans Løken
Published on 2009-11-24T15:18:34Z Indexed on 2010/06/14 13:32 UTC
Read the original article Hit count: 236

Filed under:
|
|
|

In a recent project I'm using a lot of databinding and xml-serialization. I'm using C#/VS2008 and have downloaded symbol information for the .NET framework to help me when debugging.

The app I'm working on has a global "catch all" exception handler to present a more presentable messages to users if there happens to be any uncaught exceptions being thrown. My problem is when I turn on Exceptions->Thrown to be able to debug exceptions before they are caught by the "catch all". It seems to me that the framework throws a lot of exceptions that are not immediately caught (for example in ReflectPropertyDescriptor) so that the exception I'm actually trying to debug gets lost in the noise. Is there any way to get rid of exceptions caused by the framework but keep the ones from my own code?

Update: after more research and actually trying to get rid of the exceptions that get thrown by the framework (many which turn out to be known issues in the framework, example: http://stackoverflow.com/questions/1127431/xmlserializer-giving-filenotfoundexception-at-constructor) I finally found a solution that works for me, which is turning on "Just my code" in Tools >> Options >> Debugging >> General >> Enable Just My Code in VS2008.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET