At a Glance
Step by step mode consists in executing the application program instruction by instruction. A line may contain several instructions.
This mode is launched by a breakpoint which will have been set in advance. It is used to examine the behavior of the code, and the value of the variables.
It is implemented in online mode. The section executed in step by step mode stops the corresponding task.
Three commands can be used for step by step mode. These are:
the Step Into command,
if the current element is an SR (sub-routine) or DFB (user function block) instance call, this command can be used to step into the code and go to the first element of the SR or DFB,
if the current element is an instruction, this command executes it and moves onto the next instruction.
the Step Over command,
if the current element is an SR or DFB instance call, this command executes it in its entirety as if it were a straightforward element and moves onto the next instruction,
if the current element is an instruction, this command executes it and moves onto the next instruction.
the Step Out command.
if the current element is part of the code of an SR or DFB, this command can be used to execute all the elements of the SR or the DFB and to move onto the next element of the SR or DFB.
if the current element is an instruction, this command executes the current section in its entirety and moves onto the start of the next section.
From step by step mode, if you want to relaunch the execution of the task in order to return to the breakpoint you set earlier, select the Debug->Go command from the menu, or click on Go in the toolbar:

Step Into, Step Out and Step Over
Example:

Description of step by step from the breakpoint reached :
Step |
Action |
---|---|
1 |
Clicking on the Step Into button moves execution of the program to the SR1 call. |
2 or 2’ or 2’’ |
If you click on:
|
3 |
Clicking on Step Out while in SR1 executes SR1 in its entirety and moves execution of the program on to call SR2. |
4 or 4’ |
If you click on:
|
5 |
Clicking on Step Out while in SR2 executes SR2 in its entirety and moves execution of the program onto the next instruction. |
Specific Case of Step Out
If you want to perform step by step section by section, execute the Step Out command from the first element of each section.
Rule
In step by step mode the task manager will not detect a watchdog overflow for the task currently being debugged. It will, however, detect infinite loops.