VB 2010 Express - Debugger is not breaking on errors, Sub producing error simply terminates
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 leas开发者_如何学编程t 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
Tools --> Settings --> Expert Mode
Then go to Debug -> Windows -> Exceptions. Click Thrown on CLR exceptions (all of them). The program keeps running though even after the exception is thrown.
For some This option
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.
精彩评论