VS 2008 Addon to temporarily disable / remove all catch blocks

Is there an addon with which I can temporarily disable all catch blocks. I support the application, and I need to find out exactly where it throws an exception. Someone did error handling, these are all layers to make my work tough :(

+6
debugging c # exception visual-studio
source share
4 answers

I don’t know how to disable lock blocks, but what you are trying to achieve can be easily done using the VS option in the exceptions dialog:

Debug -> Exceptions -> CLR Exceptions -> Check the "Thrown" checkbox. 

This way, VS immediately breaks when an exception is thrown before the start of any catch block.

+21
source share

You do not need to disable all catch blocks in order to determine where the exception is primarily from - in the debugger. If you open the Exceptions dialog box in VS, you can configure the debugger to catch the exception either when it is unhandled (by default) or when it will be the first. This is the easiest and least intrusive way to do this.

The Exceptions dialog box is available from the Debug menu.

+1
source share

You should use the Debug> Exceptions menu to open the Exceptions dialog box and set the Thrown checkbox to any exception for which the development environment should break during debugging.

You will find that VS will break when a specific exception (or any of its subclasses) is thrown before exception handling is executed.

This will solve your problem.

+1
source share

What I find often more interesting is the Stack window.

When in debug mode, running the project, go

 Debug => Window => Call stack (Ctrl+d, C) 

Now you can see what steps to take to come here, and you can d-click them to go to the line of code. It’s very convenient for me.

0
source share

All Articles