Jeremy Hutchinson listed out series of tips to be more productive in Visual Studio.
I was not aware of tip #2 - $exception Pseudovariable - Viewing uncaptured exception while debugging. Visual studio has a pseudo variable
$exception in the debug mode which will hold the details of the last exception. To explore
$exception, let’s create a small project:
Put a breakpoint at line 13 and run above code. The code will throw an exception and pause the execution in catch block. Now here you can use
$exception variable to inspect exception details.