For a larger object graph, I second the use of Json but with a slightly different strategy. First I have a static class that is easy to call and with a static method that wraps the Json conversion (note: could make this an extension method).
using Newtonsoft.Json;
public static class F
{
public static string Dump(object obj)
{
return JsonConvert.SerializeObject(obj);
}
}
Then in your Immediate Window
,
var lookHere = F.Dump(myobj);
lookHere will auto-show up in the Locals
window prepended with a $ or you can add a watch to it. On the right hand side of the Value
column in the inspector, there is a magnifying glass with a dropdown caret beside it. Choose the dropdown caret and choose Json visualizer.
I am using Visual Studio 2013.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…