Note: let’s not get too caught up on the semantics of “apps and APIs should be designed so that under normal use, exceptions do not occur”. This feature has existed for most of the life of Visual Studio, so it should work on any Windows version. This guide targets Visual Studio on Windows, but the feature is very similar to the same feature on Visual Studio for Mac. Breaking in the debugger on all exceptions can help to diagnose issues at the source. Sponsor my Github open source, hire me to help your team implement better exception handling, or sign up for my course Introduction to Uno Platform.Įxceptions carry a stack trace with them, so they can provide a wealth of information about where the Exception arose from and why. This article is a guide on how to turn on and use this feature.
However, by default, Visual Studio projects don’t have this feature turned on.
When debugging with the break on all exceptions feature is turned on, it is possible to get information about what went wrong immediately. Exceptions are an excellent way to tell the debugger or logging tools that something went wrong. However, developers should design apps and APIs so that under regular use, exceptions do not occur.
An app should throw exceptions when something exceptional happens.