I have a simple Windows App written in Visual Studio 2008 (.NET 3.0, C#).
Without making any change to the project, solution or Visual Studion (from what I can remember), something weird is happening: when I debug (or run) my application, when it hits an error, Visual Studio does not show me any messagebox with the error, and does not stop execution. It "looks" like nothing happened... the code after the error is not executed, but everything else continues to behave like nothing had happened.
What might be wrong?
Note: you can uncheck Break when this exception type is thrown directly in the exception handler and continue debugging (press F5 ). Visual Studio will add this exception type to the Exception settings and will remember that it shouldn't break on this exception again.
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
Click Debug, Exceptions (Ctrl+D, E) and tell Visual Studio to break on all exceptions.
Note that this will break on all thrown exceptions, not just all unhandled exceptions; that may not be what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With