During the coding journey, a very useful technique to figure out logic problems is known as debugging. You remove the bugs in the code using debugging. To use the debugger in Eclipse, navigate to the Run | Debug As menu, or simply press F11:
You will get the popup shown previously. Optionally, click on Remember my decision and then click on the Yes button.
The screen that gets displayed is shown as follows:
The box labelled 1 is where the variable and expression values can be checked and the box labelled 2 is the breakpoint on which the execution has halted. Now one can progress line-by-line using F5 or F6. F5 will go into each individual called method, whereas F6 will not. Clicking F8 will continue the execution, which might halt at the next breakpoint, if present.
The topic of debugging can consume an entire mini-book but as far as this book is concerned...