Debugging Eclipse / RAD
Nov20Difficulty: 




Okay, maybe this blog item is not worth for 1 rating star and maybe this trick is so well known that it’s only me who gets really happy. But using this trick can save me a lot of frustration and painful fists (stop-restarting debug mode “je-weet-toch”) that I should write this debugging trick down.
Say: During debugging you notice, that you specify a not existing or wrong variable. This results in a nullpointer. Fine. But instead of stop debug mode > changing code > restart debug mode (fails again, repeat process), you can also change the value on the fly, while in debug mode.
(At least when using with Eclipse or RAD.)
1. Create a debug point on the line, where the value is wrong.
2. In case the value is shoot into a method, go in that method till you get the wrong value.
3. Select the variable in your Debug-Variable window (Eclipse/RAD); Right click > Change variable
4. Enter a new variable, can be String, int or boolean – OK
5. Play the debug mode.
Posted in java |debugging, / java, / nullpointer
» Post your comment, there are no comments yet. »
Comments
- Pulkit Singhal
- Neil
- mike nittmann
- geniutrixone
- Mika
- Romfrosk
- steve
- shahzad
- Maurice
- Lee
- Oskar Krawczyk