2

I'd like to compare the state change of an instance in my program between two different breakpoints. Concretely I'd like to break at location A, get a snapshot of the current instance state, continue execution, break at location B, get another snapshot of the instance state and be able to compare the two, be it with text export and a diff tool.

I was hoping this is somehow possible with Visual Studio's debug tool tips because they can also store the last session's debug value but I haven't found a way to do so. How else can I achieve this?

user1709708
  • 1,557
  • 2
  • 14
  • 27

1 Answers1

0

VS2015 has a Diagnostic tools which shared the Memory Usage, you could take snapshot in debugging, click the View help, and double click the Object type, you could view the Instance. Is it what you want to get?

Reference: https://msdn.microsoft.com/en-us/magazine/dn973013.aspx

enter image description here

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
  • Cool feature. Not sure if applicable for my use-case or probably more compilcated than outputting the variable contents in immediate window but definitely interesting. Unfortunately I'm bound to VS2013 for now anyway. – user1709708 Aug 06 '16 at 11:18
  • You can use the "Memory Usage" under Debug->Performance and Diagnostics even if you use the VS2013. Of course, you can also use the VS2015 community version which is free. – Jack Zhai Aug 08 '16 at 07:28
  • @user1709708, if the above suggestion is helpful, please accept it as the answer. If not, please feel free to let me know. – Jack Zhai Aug 28 '16 at 07:36