Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Visual Studio Debug -> Exceptions settings?

I find that in different cases you need to have different exception classes enabled/disabled in the Debug -> Exceptions dialog, and it's hard work to keep reconfiguring this.

So, is there any way to save the Debug -> Exception setting and restore them later?

I'd like to have a couple of different configurations to load depending on my needs.

I am aware that the settings are stored in SlnName.suo, but so are a lot of other stuff and it's a daunting and risky task to fiddle with it.

The question refers to Visual Studio 2010, but I'd be interested to know if the dialog has been improved in this respect in later versions of VS.

like image 875
Kjell Rilbe Avatar asked Apr 24 '15 11:04

Kjell Rilbe


People also ask

How do I keep Debug code in Visual Studio?

To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D. The Run and Debug view displays all information related to running and debugging and has a top bar with debugging commands and configuration settings.

What is exception settings Visual Studio?

In Visual Studio, you can use Exception Settings Window to manage the exceptions – for which exception to break, at which point to break, to add or deleting exceptions. The Exception Settings windows for Visual Studio is there for quite some time.

How do I add exceptions in Visual Studio?

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. If you need to know how to add handlers for exceptions, see Fix bugs by writing better C# code.

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".


1 Answers

According to the following article:

https://faithlife.codes/blog/2010/01/saving_debug_exceptions_settings/

"These settings are stored in the SolutionName.suo file that lives alongside your .sln file. Once you’ve configured the Exceptions dialog to your liking, close all the open windows, then exit Visual Studio. Make a backup of the .suo file and restart Visual Studio. Whenever VS loses your settings, close it down, overwrite the real .suo file with your backup, restart VS, and you’re back to debugging the way you want to."

like image 190
Chucky Avatar answered Oct 03 '22 23:10

Chucky