Use F22 (Step Into) to step into program CPGM from the program DEBUGEX.
Figure 71. Module Source Display for DEBUGEX
DEBUGEX Before Stepping Into CPGM
+--------------------------------------------------------------------------------+
| Display Module Source |
| Program: DEBUGEX Library: MYLIB Module: DEBUGEX |
| 88 cout << "Please enter amount" << endl; |
| 89 cin >> input; |
| 90 if (input > MINIMUM) { |
| 91 // call function CalcTax in separate program CPPPGM |
| 92 retval1 = CalcTax(input); |
| 93 if (retval1 > LIMIT) |
| 94 retval2 = CalcSurtax(input) |
| 95 } |
| 96 cout << "Total tax is " << retval1 = retval2 << endl; |
| 97 } |
| 98 |
| 99 |
| 100 |
| 101 |
| 102 |
| More... |
| 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 at line 90 |
+--------------------------------------------------------------------------------+
|
The program stops at the first executable statement of CPGM (line 13).
Figure 72. Module Source Display After Stepping into CPGM
+--------------------------------------------------------------------------------+
| Display Module Source |
| Program: CPGM Library: MYLIB |
| 1 *=============================================================== |
| 2 * CPGM - Program called by DEBUGEX to illustrate the |
| 3 * STEP functions of the ILE source |
| 4 *debugger |
| 5 * This program receives a parameter input from DEBUGEX, |
| 6 * calculates a tax amount, and then returns |
| 7 *=============================================================== |
| 8 |
| 9 double CalcTax(double input) |
| 10{ |
| 11 double tax; |
| 12 |
| 13 tax= input * TAXRATE |
| |
| 14 return taxrate; |
| Bottom |
| 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 |
| Step completed at line 13. |
+--------------------------------------------------------------------------------+
|
If there is no debug data available, you see a blank Display Module Source display with a message indicating that the source is not available.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.