Save state of object in IntelliJ debug?

Moritz Schmitz v. Hülst picture Moritz Schmitz v. Hülst · Apr 1, 2016 · Viewed 17.1k times · Source

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?

Answer

Andrew Terekhine picture Andrew Terekhine · Apr 1, 2016

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.