VB.NET exception doesn't stop the debugger
Posted on 2008-11-19
I'm using VB.NET Express 2008, coding a Windows Forms project, and using a WebBrowser control.
The problem is that every time I run the application and it throws an exception the debugger doesn't stop in the error line, instead, three things happen:
1- The program exits from the function or sub where the error was thrown, but all the control event handlers continue running, so if I click on a button in the form then its event code is executed.
2- The WeBrowser control navigates to an unresisting page (I see the IE's not found error page), even if the code that threw the error is not related to the WebBrowser control.
3- In the inmmediate Window I see the exception text, for example "A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll".
Why is this happening? When I get into an exception I expect the execution to stop immediately.