Dumping a huge array in Intellij-Idea debugger

大兔子大兔子 提交于 2019-12-31 21:34:12

问题


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.


回答1:


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.



回答2:


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


来源:https://stackoverflow.com/questions/33549721/dumping-a-huge-array-in-intellij-idea-debugger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!