Visual Studio how to serialize object from debugger

后端 未结 10 1203
轻奢々
轻奢々 2020-12-22 16:39

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

10条回答
  •  天命终不由人
    2020-12-22 17:37

    It might be possible to use the immediate window to serialize it and then copy the content to your favorite editor.

    Another option is to override the ToString() method and call it while in debug mode.

    You can also write the contents out to a file shortly before the crash, or wrap the code into a try/catch and write the file then. I'm assuming you can identify when it's crashing.

提交回复
热议问题