I frequently use the $exception pseudovariable to gain access to the items in theUpdateException.StateEntries collection as they are not accessible via the Exception Assistant's 'View Details' dialog.
Adding a watch with the name '$exception' will return the current exception. This is also available automatically in the Locals window for C# if the exception assistant is disabled.
I have seen cases where this variable is not available. Why might this be and how can it be restored?
Edit: I have also posted this issue to Connect.
Edit2: The following post describes the purpose of this setting.
Did you know? You can unwind the call stack from exceptions
And this one includes a couple of screenshots of the dialogs involved.
Did you know… What unwinding the call stack on unhandled exceptions does? – #277
Tools -> Options -> Debugging (General) [VS 2010]
Do you have "Unwind the call stack on unhandled exceptions" unchecked ?
It needs to be unchecked for $exception to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With