My program dont stop when an error occurs
Sometimes in my program, when i run it in visual studio and there is an error, it dont stop and show the debug window. Instead it just exits the sub where the error is and continues.
Is this some function i can set to on/ off ?
How about ..Tools...Options...Debugging.."break All Processes when one breaks" and from
MyProject..Debug..."Enable Visual Studio hosting process"
The reason i now is that, in my program it was suppodes to do one thing in an opened up form, but instead it just closed the window. I then inserted a break to manually go through the code one line at a time, and i then found the error in an sql command.
But the thing that stroke me with this, was that when it got to the cmd.executenonquery command, it exited the sub (and when the sub was exited the window would close as it should). Normally when i make an error in an sql command the program stops and give me the error and line number in wich the error occurred. Here it just skips all that and exits the sub and the program continues.
Yearh, but that only help my in that specific stuation. The problem is that it is when im coding and debugging that i want the program to stop so that i easily can find any error in my application before i release it. The best way to correct errors is when the program stops and give me a line number and error code..