Dumping a huge array in Intellij-Idea debugger

前端 未结 2 609
暗喜
暗喜 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:14
    1. Right click variable
    2. Evaluate expression
    3. Type *nameOfYourArray*.toString()
    4. Click evaluate
    5. Ctrl-C to get content
    0 讨论(0)
  • 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.
    0 讨论(0)
提交回复
热议问题