RSS
 

Eclipse Tip: Change variable values while debugging

10 Feb
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.

Related posts:

  1. Eclipse tip: Rewind during debugging
  2. Eclipse tip: Watch points
  3. Eclipse Tip: Local rename
  4. Eclipse Tip: Surround With
  5. Eclipse tip: Conditional breakpoints

 
Comments Off

Posted in Eclipse, Java

 

Comments are closed.