Eclipse provides a powerful debugging view. If you set a breakpoint and start the code with “debug as …” and the breakpoint is reached, the view will be activated (if you are not there already).
The debug-view consists of the following (important) elements/tabs:
- Debug: views the threads that are active and where you are located at (which class at what line). Further, the stack trace is viewed for each thread.
- Variables: all variables that are accessible at the current scope. They can be displayed either by their natural structure (that is somethimes hard to read for humans. e.g. hashmaps) or with their logic structure. This behavior can be toggled by a small button at the top of this tab.
- Code: The classes and their breakpoints are viewed their. It can be used to do some on-the-fly editing while debugging. If possible, eclipse will roll back to the top of the edited method and continue debugging. Very handy for minor changes.
- Breakpoints: All set breakpoints (activated and deactivated ones).
- Console: Whatever is printed to the system and error console is displayed here.
Some webressources that deal with java debugging using the eclipse framework: