Changing variables in realtime when debugging in eclipse?
Solution 1:
You should be able to set a break-point, go into debug mode, open the variables views and here change the content of the variables.
Solution 2:
You can access variables through the Variables view. There you can right click on any variable and select "Change value ...".
Resources :
- standford.edu - eclipse guide
- help.eclipse.org - change var value
Solution 3:
... and you can do much, much more:-) Just to give you and idea.
You may change the code during debug which is hot swapped and is effectively changed (recompiled) in given debug session.
You may run given method run (e.g. after catching breakpoint) few times without rerunning debug -> use drop to frame feature on method stack.
Solution 4:
After you have changed the code you have to save it (cntrl-S) to make it effective. You will see your running application respond to the code-change after the cntrl-S
I hope this works for you. it took me some time to figure this out.