views:

206

answers:

1

The ability to create custom debug visualizers for any .Net type in Visual studio is an interesting feature. Is there anything similar in eclipse for java objects?

+1  A: 

I haven't investigated VS debug visualizers enough to know whether it's an exact correspondence, but Eclipse does let you convert instances of given types into strings in a specified way for the sake of debugging.

See Preferences -> Java/Debug/Detail Formatters.

Here's a blog post giving a walkthrough of an example. (There are plenty of others - a search for Eclipse and "detail formatters" will find loads. This one looked reasonable though.)

There's also the "Logical Structures" option in the same menu, and another blog post (the second part of the earlier one actually) with another example.

Jon Skeet