Breakpoint definitions are associated with the debug session, and are applied to procedures both when they are executed and when the breakpoint is defined. Thus, breakpoints can be defined before any processes have been attached to the debug session. When a process issues an EXEC command, the procedure being executed has any relevant breakpoints applied.
Statement breakpoints require a privately loaded copy of the procedure. (This is not necessary for the other types of breakpoint.) If the procedure is the target of a statement breakpoint, the debugger will automatically request that a procedure be privately loaded. Otherwise, normal procedure loading will remain in effect, as controlled by the SYSPARMS NCLTEST or PROFILE command.
Once breakpoints have been established, any NCL process that satisfies the conditions of a breakpoint is suspended. Breakpoints can be listed and cleared using the DEBUG LIST BREAKPOINTS command and the DEBUG CLEAR respectively. These commands are useful for controlling processes that have already started.
If you need to stop a process on the first statement, use the DEBUG SET NEWHOLD=YES profile command. Once set, it indicates to debug that all processes that are attached to this debug session are to be immediately suspended before the execution of the first statement.
When a process is suspended, other debug commands can be used to display variables and the source code.
To resume the execution of the process after all the required information has been displayed, use the following commands:
RESUME flags the process identified as ready to continue execution. The process is made eligible for execution and the statement step counter, set by the DEBUG STEP command, is reset.
The process is resumed in the same way as with the DEBUG RESUME command and the statement step counter is set to the value specified on the NEXT= operand. This will result in the process again being suspended after the specified number of statements have executed.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |