Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force visual studio debugger to skip specific exceptions?

I have client-server (Silverlight) app.

Some server code throws exceptions that I handle on client. When I debug - Visual Studion breaks on those exceptions and I have to hit "Continue". It really slows down development.

Is there any way to skip specific exceptions or deal with this somehow?

like image 863
katit Avatar asked Sep 22 '11 16:09

katit


People also ask

How do I skip an exception in Visual Studio?

When the debugger breaks, it shows you where the exception was thrown. You can also add or delete exceptions. With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window. Provide handlers that respond to the most important exceptions.

How do I skip the code while Debugging in Visual Studio?

You can also click on the line you want to skip to and hit Ctrl+F10 (Run to Cursor).

How do I stop Visual Studio from breaking on exception?

To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .

How do I force stop Debugging in Visual Studio?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.


1 Answers

Debug Menu -> Exceptions (Ctrl + Alt + E) -> Find.. type the exception name, then untick the check boxes.

If it's your own exception, you can add it by clicking Add, select Common Language Runtime Exceptions and then putting in the fully qualified name of the exception. Then untick the boxes.

like image 124
Ray Avatar answered Sep 23 '22 15:09

Ray