Search code examples
javadebuggingintellij-ideaintellij-plugin

Save state of object in IntelliJ debug?


Does anyone know whether it is possible to save the state of an object while debugging?

I would like to compare the state of an object in two different execution cycles.

Bonus Question: Anyone with experience in writing IntelliJ plugins? Does the IntelliJ SDK allow to access debug values in debug mode? Read them out of IntelliJ cache and write them to disk?


Solution

  • As a very simple solution you can use the Fully Expand Tree Node action for objects in Variables or Watches views. This action is bound to Numpad * key (*) by default and opens the whole object tree. Then you select all the elements of opened object tree with shift and copy them to clipboard.