Run and debug the application

Debugging the application is a two-part process. First you run the application using the Debug run configuration, which will start the debug listener on the application node. Then you launch the Eclipse remote debugger and connect to the Virtual Machine.

  1. Set a breakpoint in your application: select a source line in the main method. Under the "Run" menu, select "Toggle line breakpoint".

  2. Under the "Run" menu, select "Run Configurations...". Select the Debug configuration.

  3. Click the Run button to start the application. You'll see output in the console window ending with:

    [A] Listening for transport dt_socket at address: 6666 

  1. Now, choose the Debug perspective (the selector is in the top right tab, or look under the "Window" menu and select "Open Perspective").

  2. Under the "Run" menu, select "Debug Configurations".

  3. In the left pane, select the debug configuration created earlier - the default name is QuickStartObject.

  4. Click the Debug button.

Eclipse returns to the debug perspective, and the Eclipse remote debugger connects to the application node. The application will start and run until the breakpoint you set is reached.

An excerpt of the Debug perspective - execution stopped at breakpoint

Figure 3.3. An excerpt of the Debug perspective - execution stopped at breakpoint


Now you can:

As you debug the application, its console output continues to be displayed in the debug perspective Console tab.