Possible Duplicate:
Silent failures in C#, seemingly unhandled exceptions that does not crash the program
I'm sorry if this has already been discussed, but I really sarched for it and couldn't find an answer.
It happens on Visual Studio 2010, when working with Windows Forms Application.
The thing is it doesn't show me runtime errors when I execute it with "Start Debugging" options. It works fine on old projects that I have saved here, but when I start a new one, I have this issue. For example, I simpy start a new application and put this on Form_Load:
int a = 0; int b;
b = 4 / a;
If I run my application by pressing Ctrl + F5, it shows me normally the division by zero exception. But if i run it by pressing F5, it just ignores the error. It won't stop the application and point the error line, which it would normally do. And every other error is also being ignored. The errors happen when I run my application without debugging, but not when debugging.
I tested for both C# and VB.NET applications and had the same issue. I don't remember changing anything on VS config, does anybody know why errors aren't being shown to me on new applications??
Thanks.
EDIT:
Thanks, Jeff E. It's as shown on link: Silent failures in C#, seemingly unhandled exceptions that does not crash the program
I never knew errors aren't shown on Form Load. All the code I tried were on Form Load and Form Activated.
I'm sorry for my ignorance, thanks again everyone.