views:

115

answers:

2

I'm using VB 2010 Express.

When an error occurs in the form load function, the form load function simply terminates.

Then, when I click on one of my buttons, the button click sub also terminates if it has an error.

I can wrap the code that produces the errors in try/catch blocks, but I'd very much rather the debugger to throw an immediate break point (like usual) or at least exit the program.

It's making it very difficult to program, not knowing whether or not previous Subs executed fully.

Any thoughts on what might be going on?

Thanks

+1  A: 

Do you see first chance exception message in the debugger output window? Find this exception in the Debug - Exceptions dialog and check "Break at first chance", then run the program under debugger again.

Alex Farber
+2  A: 

Tools --> Settings --> Expert Mode

Then go to Debug -> Exceptions. Click Thrown on CLR exceptions (all of them). The program keeps running though even after the exception is thrown.

Johnny Whisman
Thank you very much! This helped solve the problem I have with why some errors of mine were being thrown and some weren't. :)
Jeffrey Kern