Important: You do not have the latest version of CIMPLICITY! You are missing out on the newest capabilities and enhanced security. For information on all the latest features, see the CIMPLICITY product page. For more information on upgrades, contact your Proficyl sales agent or e-mail Proficy Sales Support. For the most up-to-date documentation, go here.
2. Step through Scripts
About this task
Step through a script procedure
Step through a script tools
Step through a Script Procedure
Two methods are available to step through a script.
Both methods involve stepping through a script code line by line.
Method
Description
Single step
Steps into calls to user-defined functions and subroutines.
Procedure step
Does not step into calls to user defined functions and subroutines. The procedure step does execute the calls.
Procedure
Use either method to start stepping through your script with either the single step or procedure step method.
Method
Do one of the following.
Single step
Click Debug>Step on the CIMPLICITY Program Editor menu bar.
Press F8 on the keyboard.
Procedure step
Click Debug>Step Into on the CIMPLICITY Program Editor menu bar.
Press Shift + F8 on the keyboard.
The Program Editor places the instruction pointer on the sub main line of the script.
Repeat the command as many times as necessary to continue stepping through..
Each time you repeat the Step command, Program Editor executes the line containing the instruction pointer and moves the instruction pointer to the next line to be executed.
Do one of the following when you finish stepping through the script execution.
A
Click the Start button on the Application toolbar.
B
Click the End button on the Application toolbar.
C
Click Run>Start on the Program Editor menu bar.
D
Click Run>End on the Program Editor menu bar.
E
Press F5 on the keyboard.
Note: When script execution is initiated, the script will first be compiled, if necessary. Therefore, there may be a slight pause before execution actually begins. If the script contains any compile errors, it will not be executed.
Do the following.
Correct any compile errors
Initiate execution again.
Repeat the Step command to continue stepping through the script line by line,
Step through a Script Tools
Calls dialog box
Set Next Statement
Calls dialog box
When stepping through a subroutine, you can determine the procedure calls made to arrive at the paused point in the script..
Do one of the following.
A
Click Debug>Call Stack on the Program Editor menu bar.
B
Press Alt+D+K on the keyboard.
The Calls dialog box opens when you use either method.
The Calls dialog box lists the procedure calls made by the script to arrive at the selected subroutine.
Do one of the following.
Click
Description
Show
Select a procedure call in the Calls list.
Click Show.
The Calls dialog box closes.
The Program Editor highlights the currently executing line in the procedure you selected, scrolling that line into view if necessary.
Close
Closes the Calls dialog box.
Help
Opens the Program Editor documentation.
Set Next Statement
When stepping through a subroutine, you can move the insertion point to another line within a subroutine to repeat or skip execution of a section of code.
Place the insertion point in the line where you want to resume stepping through the script.
Do one of the following.
A
Click Debug>Set Next Statement on the Program Editor menu bar.
B
Press Alt+D+N on the keyboard.
Results
The instruction pointer moves to the line you selected; you can resume stepping through your script from there.
Note: You can only use the Set Next Statement command to move the instruction pointer within the same subroutine.