Executing Highlighted Code in Eclipse Debugger

written in debugging, guide, java

Just a short one for my sake since I keep forgetting.
Highlight a segment of Java code while on a breakpoint and press ctrl+u to execute, or ctrl+shift+d to execute and display the result. Helpful for when you want to check if a certain conditional that’s coming up in the next lines will return what you believe for it to return.

Having this is super handy and something I miss when jumping from Chrome’s javascript debugger that allows you to execute any arbitrary code in the console.