![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using SteppingStepping commands allow users to walk through the code as it executes. This enables the programmer to read through the source code in execution order and limits the code to be read. Stepping commands are available to execute for a single line or instruction, stepping into or over called subprograms (Ada) or functions (C/C++).
Stepping allows you to control when the execution of a task will be stopped. For purposes of our discussion of stepping, a statement is a statement or declaration that has associated assembly code. Some declarations and statements are optimized away and thus have no associated assembly code.
The following step commands are available (in order from least detailed to most detailed).
Whenever the execution of a task stops and the Visit Source debugger option is selected, an editor window with the current language unit is displayed. The current statement is displayed in reverse video
Note: Stepping can also be accomplished directly in the Source window or through commands entered on the Command Line Paneat the Command Prompt. Additional information about stepping can be found in Using the Apex Debugger.
Exception Handling during Step Commands
If an exception occurs during a step command:
- If the exception is caught in the debugger, the step is not completed; when the program is continued, it executes to the normal completion of the step. That is:
- A step command is in progress.
- An exception is raised that is to be caught.
- The debugger catches the exception and stops execution.
- When execution is continued, the step command is completed.
- If the exception is not caught in the debugger, the program executes to the normal completion of the step.
The normal completion of the step is determined as follows:
- If the exception is handled by an exception handler within the scope of the step, the exception handler is executed and the step command continues as normal.
- If the exception is handled by an exception handler beyond the scope of the step, execution stops at the first statement in the exception handler and the step is considered completed.
- If the exception is not handled by an exception handler, the program terminates.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |