Step through Java programs to debug

You can step through your program while debugging. You can either step over or step into other functions. Java™ programs and native methods can use the step function.

When the program source first displays, you can start stepping. The program stops before running the first statement. Press F10 (Step). Continue to press F10 (Step) to step through the program. Press F22 (Step into) to step into any function that your program calls. You can also start stepping anytime a breakpoint is hit. For information about setting breakpoints, see Set breakpoints.

+--------------------------------------------------------------------------------+
|                            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            |
|Step completed at line 42 in thread 00000019                                    |
+--------------------------------------------------------------------------------+

To stop stepping and continue running the program, press F12 (Resume).

For more information about stepping, 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 step, see Evaluate variables in Java programs.