Dumping a huge array in Intellij-Idea debugger

前端 未结 2 608
暗喜
暗喜 2021-02-05 12:52

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.

2条回答
  •  感情败类
    2021-02-05 13:15

    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.

提交回复
热议问题