Step-By-Step Debugging

To minimize risk, the KAS IDEClosed"Integrated development environment" An integrated development environment is a type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger in conjunction with the KAS Simulator allows checking and validating the application program prior to deployment of the machine/system in production. This is achieved by capturing critical events in a step-by-step mode.

In addition to the cycle-by-cycle execution mode, the debugger has a rich collection of powerful features for making step-by-step debugging in the source code of your application.

Figure 5-58: PLC Options - Debug Compiling Mode

  • An application compiled in Debug mode includes additional information for stepping. This leads to bigger code size and reduced performance.
  • When debugging is finished, it is recommended to compile your application in Release mode to give highest performance to your application.

Step-by-step debugging is available:

There are two possibilities for entering the step-by-step debugging mode:

  • Set a breakpoint in a program (for more details, see "About Breakpoints")
  • When you start your application and the breakpoint is reached, the execution stops at the specified location and you can run one step further in the program with the stepping commands.

  • When the target is in cycle stepping mode (STOP), you can step to the beginning of the first program.

  • Pausing a program will not interrupt the current VM cycle. The current cycle will finish and execution will be paused before the beginning of the next VM cycle.

The following commands are available from the Debug Toolbar for stepping:

Icon Description

Step Over the next instruction:
If the next instruction is a call of a function block or a sub-program, the execution passes over to the following instruction.

Step Into the next instruction:
The next step will be at the beginning of the called block
(if the next instruction is not a call of a function block or a sub-program, then the Step Into behaves like the Step Over)

Step Out the current block:
If the current stepping position is in a called function block or a sub-program, the execution continues up to the end of the current block. Otherwise, the Step out behaves like the Step Over.

In addition to these commands, you can click at any time:

Icon Description
Execute the cycle (from the current position up to the end of the last program)
Restart the target in "normal" execution mode (RUN)