Home Step 02 Step 04

Remote debugging tutorial

This tutorial is a feature of JBuilder Enterprise.

Step 3: Setting breakpoints

In this step, you will set a line breakpoint in the client process and a cross-process breakpoint in the server process. The line breakpoint will cause the client to pause when the cross-process breakpoint is about to be called. The cross-process breakpoint will pause the server. This technique allows you to step into a server process from a client process.

To set a line breakpoint in the client process,

  1. Double-click SimpleRMIClient.java in the project pane. It is opened in the editor.

  2. Use the Search|Go To Line command to go to line 55, the line that reads:

         Date d = myServerObject.getDate();

  3. Click the gutter, the gray area to the left of the line of code, to set a breakpoint on the line.

To set a cross-process breakpoint in the server process,

  1. Choose Run|Add Breakpoint|Add Cross-Process Breakpoint. The Add Cross-Process Breakpoint dialog box is displayed. (The server file does not need to be opened in the editor.)

  2. Choose the Browse button to the right of the Class Name field.

  3. In the Select Class dialog, expand the com folder and browse to the server implementation class, com.borland.samples.rmi.SimpleRMIImpl.

  4. Click OK to close the dialog box.

  5. Choose the Browse button to the right of the Method Name field.

  6. Choose getDate() in the Select Method dialog box.

  7. Click OK to close the dialog box.

  8. Leave the Action option in the Add Cross-Process Breakpoint dialog box set to Stop Execution.

  9. The Add Cross-Process Breakpoint dialog box should look like this:

  10. Click OK to close the dialog box.

In the next step, you will compile the server and copy the server class files to the remote computer.

Home Step 02 Step 04