Eclipse Debugger Tutorial
Eclipse Debugger Tutorial
Charlie Abela
1.
So for example when developing Java applications the Java perspective is used. It is easy to change between perspectives, especially if different application development languages are used (e.g. PHP, C++ etc). Fig. 1 below shows how to access or change between these perspectives. Depending on the perspective different tools associated with that perspective will be made available.
It is also possible to change between different views. These are represented by multiple detachable windows.
Java Tutorials
Charlie Abela
2.
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.
Java Tutorials
Charlie Abela
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.
Java Tutorials
Charlie Abela 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.
Java Tutorials