.NET Event Handlers and Debugging

When debugging ActiveX controls, you may notice that event handlers don't run to completion. This is caused by exceptions which are quietly suppressed.

Most exceptions are quietly suppressed. You can control this using the debugger exceptions settings (accessed using the Debug, Exceptions menu command). On the Exceptions dialog, highlight the Common Language Runtime Exceptions and select it using the check box (VS 2005) or select "Break into the debugger" (VS.NET 2003, both entries).

VS 2005

VS.NET 2002/2003



Once this is defined, any exceptions along with their error messages, which are generated in ActiveX control event handlers, will be displayed using the usual dialog, where you have the option of continuing or breaking into the debugger.