Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging raw view content

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?

like image 382
Rod Avatar asked May 04 '11 16:05

Rod


People also ask

How do I view variables in Debugging?

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.

What is raw view C#?

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.

How do you Debug disassembly?

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.

How do I enable Debugging in Visual Studio?

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.


2 Answers

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.

like image 66
Jaimal Chohan Avatar answered Sep 25 '22 00:09

Jaimal Chohan


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.

like image 20
SLaks Avatar answered Sep 22 '22 00:09

SLaks