Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 debug does not stop on error

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?

like image 703
Diana Avatar asked Apr 15 '10 11:04

Diana


People also ask

How do I make Visual Studio not stop on exception?

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.

How do you stop a breakpoint in Visual Studio?

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.

Why are my breakpoints not working?

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.


1 Answers

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.

like image 77
SLaks Avatar answered Nov 14 '22 21:11

SLaks