Stepping

Stepping enables controlled execution of applications, for example to check for errors.

CODESYS provides the following functions for this:

  • Step into: Execution of each statement one at a time; also in called POUs.
  • Step over: Execution of statements in one step; called programs are processed.
  • Step out: The statements from a called program are processed through in one step are return to the calling program.
  • Run to cursor: The program is processed from the current step to the current cursor position.
  • Set next statement: Definition of any program line as the next statement.
  • Show next statement: Jumps to the program statement executed in the next step.
  • View ‘Call stack’: Shows the full previous call path for the current position reached in the program processing.

The possible stop positions when stepping depend on the editor type. The current position is highlighted in yellow with the “next” symbol ( b4ea395b460596ffc0a8640e000aa41c_d1fcc1f31e8da3f9c0a8640e01947982 ).

Note

Stepping commands are available only in online mode.

Before you can use stepping commands, the program must be halted at a defined program step, for example by setting a breakpoint.

Note

The ‘Call tree’ view shows the location of the block in the call structure of the program at all times, even before compiling the application.

See also