Eclipse Force Return at Debug Time

If you ever want to force Eclipse debugger to return prematurely, you can follow the three simple steps as shown in the attached screenshot.



Step#1: Put a breakpoint at where you want the premature return to happen, start to debug your code until the breakpoint is hit;

Step#2: Open Display view and type in the expected value to be returned, for example, the value “false” in the screenshot;

Step#3: Select the value, right click to bring up the context menu, click “Force Return”.

That’s it, you are all done 🙂

This entry was posted in Tool and Debug and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s