CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Exceptions in mscorlib when debugging

This is a little trick Gaston of MyFone  learned me. It was his project which started it but let me share it with all of you.

When trying to debug an asp.net app VS kept on popping up errors in mscorlib.dll. Most errors pointed to things going wrong with parameters passed to COM objects used. But .net should take care of that and worse was that the errors were hard to reproduce. The fix was in the Debug | Exceptions menus of VS (<ctrl><alt><e>). These settings are on a project base ! Here you tell vs what to do when an exception is thrown in this app. Settings are applied on categories of exceptions. Exceptions in the CLR forms one.

In this project VS was told to break into the debugger for a CLR exception. Setting it to continue fixed the problem. The second option is what to do with unhandled exceptions. I would like to see these in the debugger. But nothing came back, the CLR was perfectly capable of handling them.

Peter



Check out Devlicio.us!