ic3
ic3

Reputation: 7680

Dumping a huge array in Intellij-Idea debugger

Is there a way in Idea to dump the content of a large - very - array of ints into the clipboard ?

'copy value' on an array return nothing.

Upvotes: 29

Views: 21262

Answers (2)

Dodi
Dodi

Reputation: 2269

  1. Right click variable
  2. Evaluate expression
  3. Type *nameOfYourArray*.toString()
  4. Click evaluate
  5. Ctrl-C to get content

Upvotes: 5

Mathieu Schmitt
Mathieu Schmitt

Reputation: 716

To get the value in the clipboard using copy value, you need to define a "Java Data Type Renderer" to interpret the content of your array.

  • Right click on your array variable
  • Select "View as->Create..."
  • In the "Java Data Type Renderers" window, create a new entry, set "When rendering a node, use following expression" with Arrays.toString(this).
  • Apply, select your array variable and do Ctrl-C to get the content.

Upvotes: 55

Related Questions