Debugging in Eclipse, for the lazy people

When I define a breakpoint in Eclipse, I can check the values โ€‹โ€‹of the variables by hovering over it. I can also switch to the Debug perspective and do more advanced tasks such as writing custom expressions and changing the value of variables. I would like to know if it is possible to accomplish some of these tasks in the window that opened when I hovered over the variable? For example, to write your own expression to translate the value of a Java Calendars object into a human-readable format on the fly, etc.

enter image description here



source to share

1 answer

You can define a custom formatter that overrides the toString()

default implementation for the type in Window-> Preferences-> Java-> Debug-> Detail Formatters:

enter image description here



All Articles