visual-studio-2010debuggingtracelistenerfirst-chance-exception

Prevent first chance exceptions in Output windows


In Visual Studio 2010, is it possible to prevent first chance exceptions from writing to the Output window? We have a scenario where there are lots of casts that are failing by design, and the output window is really slowing down the application when debugging. Writing out A first chance exception of type 'System.InvalidCastException' occurred... over and over just takes a long time. The console in Visual Studio is not fast :<)

I'm aware of the option to not break on first chance exceptions, but that doesn't seem to affect the output windows. Neither does putting this before the area that is slowing us down:

Debug.Listeners.Clear()

Closing the Output window also does not help. It runs very fast in release mode though.

Any help is appreciated!


Solution

  • I can answer this for Visual Studio 2013:

    In VS 2013 you can go to the DEBUG menu - Options and Settings... - Debugging - Output Window. Under "General Output Settings" you find "Exception Messages". Turn it off.