Have you discovered the Display view in the Eclipse debugger? It is my personal favorite. In it, you can execute any Java code in the context of a running debugger.
To open this view, select Window > Show View > Display.
When the debugger hits a break point, you can type some Java code in the Display view. The Java code can use the local variables in the currently selected frame in the Debug view.
To execute the code and display the returned value, push the button with a "J":
If you just want to execute some code that doesn't return a value, push the button with an arrow ">" and a "J":
The standard output will be printed to the Console view:
This is incredibly useful! You can for instance run some code in a debugger and run some complex debugging code, or prototype some code for a new method.