开发者

Is there a plugin for eclipse to examine 2D arrays while debugging?

开发者 https://www.devze.com 2023-02-14 03:23 出处:网络
I\'m looking for a plug-in which displays a 2D array as a table while debugging. It will be great if it allows:

I'm looking for a plug-in which displays a 2D array as a table while debugging. It will be great if it allows:

Currently I'm using a utility class whose toString method returns a string like:

0[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1[ 0, 1, 1, 1, 1, 0, 1, 1, 0, 1]
2[ 0, 0 ...

so while debugging in eclipse I can create an expression like :

new Array2Dformatter(array)


What exactly do you need this for? I think your solution is the best, but you should consider using the debug tools provided to you by Eclipse.

Is this for java?


Cool idea..

I usually do the following. I use the Eclipse Debug tools, like the Variables view, Inspect option and Display view. To get what you want try this one out. During debug, go to the Variables view, right click the variable and select New Detail Formatter...

Do that and you can display your array in the Variable view in the way you want (you need to put your toString() code here). Hope this works.


I have enhanced my utility class which now pops up a Jframe and does every trick I want. Best things is when code is stopped by a break point jframe continues responding. But I still prefer it to be part of eclipse not a class that I have to copy to every project.


Right click wrap text, and resize the window so that it matches with column size of array

0

精彩评论

暂无评论...
验证码 换一张
取 消