Eclipse Tip: Change variable values while debugging

When you are debugging, some times, you would want to change the value of a variable. For example a variable is null and you know you are going to encounter the dreaded NullPointerException. If you could just set the correct value to it you can proceed with the debugging and worry about the null check later.

Well Eclipse to the rescue. Just right click on the variable in question and choose Assign Value. You get a popup dialog where you can set the value. Now you can continue debugging happily.