Set breakpoints

The running of a program can be controlled with breakpoints. Breakpoints stop a running program at a specific statement.

To set breakpoints, perform the following steps:

  1. Place the cursor on the line of code where you would like to set a breakpoint.
  2. Press F6 (Add/Clear breakpoint) to set the breakpoint.
  3. Press F12 (Resume) to run the program.
Note: Just before the line of code runs, where the breakpoint is set, the program source is displayed indicating that the breakpoint was hit.
+--------------------------------------------------------------------------------+
|                            Display Module Source                               |
|                                                                                |
|Current thread:   00000019     Stopped thread:   00000019                       |
|Class file name:   Hellod                                                       |
|35  public static void main(String[] args)                                      |
|36      {                                                                       |
|37    int i,j,h,B[],D[][];                                                      |
|38      Hellod A=new Hellod();                                                  |
|39      A.myHellod = A;                                                         |
|40      Hellod C[];                                                             |
|41     C = new Hellod[5];                                                       |
|42      for (int counter=0; counter<2; counter++) {                             |
|43        C[counter] = new Hellod();                                            |
|44        C[counter].myHellod = C[counter];                                     |
|45      }                                                                       |
|46      C[2] = A;                                                               |
|47      C[0].myString = null;                                                   |
|48      C[0].myHellod = null;                                                   |
|                                                                                |
|49      A.method1();                                                            |
|Debug . . .                                                                     |
|                                                                                |
|F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display variable      |
|F12=Resume   F17=Watch variable   F18=Work with watch   F24=More key            |
|Breakpoint added to line 41.                                                    |
+--------------------------------------------------------------------------------+

When you hit a breakpoint, if you want to set breakpoints that are only hit within the current thread, use the TBREAK command.

For more information about system debugger commands, see WebSphere® Development Studio: ILE C/C++ Programmer's Guide, SC09-2712 Link to PDF. and online help information.

For information about evaluating variables when a program stops running at a breakpoint, see Evaluate variables in Java™ programs.