How to check the handled Exceptions during debug ? in Visual Studio 2019

10. May 2020

Question searched on google

How to check which exception is firing even when it is handled in code using Visual Studio 2019

 

I have thrown an exception in my privacy action as below code shows

throw new NotImplementedException();

 



Run the web application in Debug mode.

Now when i goto privacy action in browser nothing happens as the thrown exception has been caught in my code . Suppose you want to check all the exceptions who are caught and handled during the runtime then what will you do .

Open the Exceptions Settings Window in Bottom of Visual Studio 2019 when application is running.


Now check the Common Language Runtime Exceptions Checkbox .

 



Load the privacy action again in browser , this time you will see the exception thrown and execution breaking the code line of throw new NotImplementedException();

 

 

By this method you can check all the exceptions thrown in a large project even when they are handled .

Debugging, Exceptions, Visual Studio 2019 ,

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading