Debugging is the part and parcel of every programmer's workday. There are a variety of tools to help you, but if you are using an editor then it becomes quite easy to debug the program. Over at Eclipse Blog, Rohit provides the steps to follow while debugging a Java program using Eclipse. Illustrated with screen shots the steps are as follows:
Load your application and open the "java" file that you wish to debug. Do not forget to switch to Debug perspective
The window providing several options for debugging appears. Eclipse allows you to debug not just a Java application, but also Remote Java Application, Junit Test Case, SWT Application etc. After supplying the arguments, click the "Debug" buttom. The Debugger will connect to your java application under debugger perspective.
Now you can enable or disable debug points in the application by just making a double click on the line where you want to stop execution of the program
Use either keys F5-F8 or bar or the bar shown below debug window for debugging the application