VS Does not break on Uncaught exceptions.

Matthew Busselberg 21 Reputation points

This issue specifically applies to .NET languages and probably /clr code.

For a while Visual Studio has not been breaking when an exception occurs on a seemingly inconsistent basis unless I am specifically stepping through method where the exception occurs. Instead it just breaks at Application.Run() in the static main method in Program code. I am not sure if this "feature" was changed with upgrade to 2019 or with 2017 but I am REALLY REALLY sick of it. I usually have to pinpoint the method where the error is occurring in order to get it to break so that I can see what is happening. I have tried to search online for a solution but can only find questions and solutions relating to breaking ALWAYS (including caught exceptions). Here is what I want: I want Visual Studio to break IMMEDIATELY on ALL UN-caught exceptions; regardless of where they are (methods and properties). Frankly I don't understand why this isn't the default setting. How do I do this?

EDIT: ALSO... how do I request this be the default setting? I have had to restart a time consuming application over SIX TIMES to figure out where this error is occurring just so I can figure out why.

A cross-platform toolchain for developing, building, running, and publishing .NET applications.
328 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,616 questions
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,659 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Karen Payne MVP 35,386 Reputation points


    To break on unhandled exceptions check "Common Language Runtime Exceptions" as per below. If that does not help let me know.


    0 comments No comments