IntelliJ has a feature that lets you specify an expression to execute instead of .toString() when showing a textual representation of an object in the debugger.
Unfortunately, in my particular case, the operation I want to perform is not small enough to fit in a single expression (viz. iterating through an array, convertin开发者_Go百科g each of its elements to a string and joining those strings together). The object itself is defined in generated code, so adding a .toPrettyString() method is out of the question.
Is there any way to create a more complex debug view? Eclipse can do this.
I don't know a way to perform complex debug operation in IntelliJ, but you can use a debug helper class containing static methods that will do the job and pass your instance to this method in the data type renderer...
加载中,请稍侯......
精彩评论