When inspecting an object in debug mode, there is sometimes, if not always, a Raw View that can be expanded. What is this? Can I access this in my code?
The most commonly used way to look at variables is the DataTip. When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable.
The Raw view is the raw object, without anything else added (or removed). I don't see why you'd want to access the debug view in your code, as you already have access to the object in your code.
To enable the Disassembly window, under Tools > Options > Debugging, select Enable address-level debugging. To open the Disassembly window during debugging, select Windows > Disassembly or press Alt+8.
To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.
For some complex types, such as List
or List<T>
, the VS devs have developed a customized view (Debugger Proxy) that makes viewing the object easier/clearer and provides a more helpful display. You can create your own customized views if you want to.
The Raw view is the raw object, without anything else added (or removed).
I don't see why you'd want to access the debug view in your code, as you already have access to the object in your code. Unless of course you're talking about accessing the private/protected properties you see in debug view but don't have access to in code. You can access these, via reflection.
This is a debugger type proxy.Raw View
shows you the ordinary members of the object—what you would have seen had there not been a DebuggerTypeProxy
.
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