How to see exception detail in debugger without assigning variable to exception?
You don't need to do anything: just put a breakpoint inside the catch
(or on a catch
and step once into the block) and you should see an invitation to see the exception helper. This works for naked catch
or for type-specific catch(SecurityException)
blocks:
which gives you everything:
You can see your exception in Locals list or use $exception
in Watch list:
try
{
// some code
}
catch (SecurityException)
{ // place breakpoint at this line
}