Debugging an Application

The debug function examines programming errors. This requires a connection to the device.

  1. Move to the “DEBUG” tab in the menu ribbon.
  2. To start the debug process, click [Start].
  3. To create a watch window, click the [Monitoring] button in the menu ribbon and select one of the five entries.
  4. This will open the “Watch” panel.
  5. Double-click the “Expression” field and then the […] button displayed there for the Input Assistant.
  6. Select the value or values to be monitored.
  7. Selecting Values for Monitoring
  8. Transfer the value or values by clicking [OK].
  9. Watch List
  10. Click the [New] button in the “Breakpoints” group to add breakpoints.

    Breakpoints can be set at specific positions in the program to stop execution. Specific conditions can be defined for the stop (see CODESYS online help, “Breakpoints”).
  11. Then click [Toggle] to activate the breakpoint.

Step-by-step processing via Single Step (menu ribbon, “DEBUG” tab) enables the program to be run in controlled steps. The particular variable values can be examined at each stop. A [Call stack] (menu ribbon, “VIEW” tab) can be displayed to determine the current position.

The flow control can be activated to track previous sections of the application program. Unlike standard monitoring, which only displays the value of a variable between two cycles, the flow control supplies the value for each processing step precisely at the time of processing.

For additional information see: