Using the
debugger :
To make
use of the debugging tools in Eclipse, we have to change to the Debug
perspective and make the Debug and Expressions views visible. If the
perspective is not visible in the drop down menu, click on Other and select it
from the presented list.
If the perspective is not visible in the drop down menu, click on Other and select it from the presented list.
It is possible to add a Breakpoint so that execution stops or starts from that particular line of code. Double clicking in the line number column on a particular line will automatically add or remove an existing breakpoint.
Next it is possible to add a watch expression which will be monitored during the debugging process. To perform this process, just right-click in the Expressions view and click on Add Watch Expression.
To start the debugging process, right-click in the window related to the class that you want to debug and choose Debug As then select Java Application.
It is now easy to Step-Into or Step-Over the code and visualise what is happening to the selected variables or object expressions declared in the Expressions view.
No comments:
Post a Comment