2 Minutes To Code (β Version)

Debugging with Eclipse - 2 minute tutorial

How to debug a java app running locally in Eclipse

After setting the breakpoints as shown in the previous 2 pages, you are now ready to launch your program.

From here on there are 2 ways to run the program and connect the debugger to it :
  1. Local debugging : In this case, you run both the program and the debugger in Eclipse on the local system. This case is discussed below.

  2. Remote debugging : Here, you run the debugger in Eclipse on the local system and you can run your java app either on the local machine or remote machine in a standalone jvm. This case is discussed in next page.

So now let's start a local debugging session. Click on the littele arrow beside debug option (highlighted in the image below), and click on Debug As > Java Application. And that is all, you program will start and as soon as a breakpoint is hit, execution will be suspended.