I just learned about $exception in the VS.NET watch window for .NET yesterday. This shows the current exception that has been thrown and is a big time-saver in not needing to find the little exclamation point icon and hover over it.
What other special variables are there in the watch window?
(Note: this question is about .NET, not C++.)
Supported Pseudovariables in Visual Studio for .NET debugging:
$exception
displays an error message. In Visual C# only, when the Exception Assistant is disabled, $exception
is automatically added to the Locals window when an exception occurs.The following only apply to Visual Basic:
$delete,
variable or $$delete,
variable.$objectid,
expression or $listobjectids,
expression.IDynamicMetaObjectProvider
. Interface. The syntax is $dynamic,
object. This feature applies only to code that uses .NET Framework version 4. See Dynamic View.If you right click any variable in the Watch window, you can create an Object ID. This will give you a number, e.g. the first object ID will be 1#.
The Object ID represents the specific instance. The instance can then be watched in the Watch window just like a regular variable, but you can keep watching the instance even when local reference go out of scope. When it eventually gets garbage collected you will lose access to it.
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