I have an rare data-dependent error in some code. It's difficult to reproduce the conditions that generated the problematic data, so I need to be able to serialize the (fairly large) data that causes the error to disk to make a test case. Is there any way to serialize data from the debugger?
+1
A:
Is all the data that you want already in some serializable form? If so, you could use the Immediate window to create an appropriate serializer and write it to disk that way.
If you need to do this reasonably regularly, and if you're after the data contained in a single object, you could add a method to that type to dump the data to disk given just a filename - and again, call that method from the Immediate window.
Jon Skeet
2009-03-14 21:19:34