ILE C/C++ Programmer's Guide

Setting Unconditional Breakpoints from the Display Module Source Display

Example:

This example shows you how to set an unconditional breakpoint using F6 (Add/clear breakpoints).

  1. Enter DSPMODSRC. The Display Module Source display is shown.
  2. To display the module source that you want to modify, type display module name, where name is the file name of the module you want to modify, and press Enter.
  3. For each unconditional breakpoint you want to set:
    1. Place the cursor on the line that should follow the new breakpoint.
    2. Press F6 (Add/Clear breakpoint).
      Note:
      If there is no breakpoint on the line you specify, an unconditional breakpoint is set on that line. If there is a breakpoint on the line you specify, it is removed (even if it is a conditional breakpoint).

      The following example shows an unconditional breakpoint set at line 50 of module T1520PG1:
      +--------------------------------------------------------------------------------+
      |                              Display Module Source                             |
      | Program:   T1520PG1       Library:   MYLIB          Module:   T1520IC2         |
      |     46    {                                                                    |
      |     47      if (j<0) return(0);                                                |
      |     48      if (hold_formatted_cost[i] == '$')                                 |
      |     49      {                                                                  |
      |     50        formatted_cost[j] = hold_formatted_cost[i];                      |
      |     51        break;                                                           |
      |     52      }                                                                  |
      |     53      if (i<16 &&; !((i-2)%3))                                           |
      |     54      {                                                                  |
      |     55        formatted_cost[j] = ',';                                         |
      |     56        --j;                                                             |
      |     57      }                                                                  |
      |     58      formatted_cost[j] = hold_formatted_cost[i];                        |
      |     59      --j;                                                               |
      |     60    }                                                                    |
      | Debug . . .  ___________________________________________________________       |
      | ________________________________________________________________________       |
      | F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display variable     |
      | F12=Resume       F17=Watch variable   F18=Work with watch  F24=More keys       |
      | Breakpoint added to line 50                                                    |
      +--------------------------------------------------------------------------------+
      Note:
      To remove a breakpoint, use the CLEAR command. For example, clear 50 removes the breakpoint at line 50.
  4. After all breakpoints are set:
    1. Press F12 (Cancel) to leave the Work with Module Breakpoints display.
    2. Press F3 (End Program) to leave the ILE source debugger. Your breakpoints are not removed.


[ Top of Page | Previous Page | Next Page | Table of Contents ]