023 - Pseudovariables in Watch window
Another debugging topic today. And another look at Watch window π in Visual Studio. Using it, we can observe values of our variables while the code is running but sometimes thatβs not enough. We can use pseudo variables.
The documentation π is attached as link below π but it doesnβt contain the full list.
- π $exception is probably the most know one; it holds the last thrown exception
- π $returnvalue holds the result of the function right after we exit
- π $asyncStateMachine - the state machine object, available inside async method
- π $threadSmallObjectHeapBytes, $threadUserOldHeapBytes - give an info about how much bytes were allocated by the current thread
π See the docs: Pseudovariables in the Visual Studio debugger