Eclipse Debugging Tutorial by Lars Vogel
Most people know Eclipse as an integrated development environment (IDE) for Java. Eclipse is created by an open source community and is used in several different areas, e.g. as IDE for Java or for Android or as a platform to develop Eclipse RCP applications, etc.. The usage of Eclipse as a Java development environment will be described in this tutorial.
Create a Java project “de.vogella.debug.first” with the package “de.vogella.debug.first” and the following classes.
<pre>package de.vogella.debug.first;
public class Counter {
private int result=0;
public int getResult() {
return result;
}
public void count() {
for (int i = 0; i < 100; i++) {
result += i +1;
}
}
}</pre>
<pre>package de.vogella.debug.first;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Counter counter = new Counter();
counter.count();
System.out.println("We have counted " + counter.getResult());
}
}
Debug
Setting Breakpoints
To set breakpoints right click in the small left column in your source code editor and select toggle breakpoint. Or you can double click on this place.



Interviews
http://www.acmsolver.org/interviews
