I'm trying to investigate a bug in a crash dump (so I can not change the code). I have a really complicated object (thousands of lines in the serialized representation) and its state is inconsistent. To investigate its state the Visual Studio debugger view is useless. But the object has a data contract. I'd like to serialize it and then use my favorite text editor to navigate across the object. Is it possible to do the from the debugger?
With any luck you have Json.Net in you appdomain already. In which case pop this into your Immediate window:
Newtonsoft.Json.JsonConvert.SerializeObject(someVariable)