Debugging in ST editor

The code generation of the control statements like if…end_if and case…end_case does not use jumps. Instead the instruction's execution conditions are set accordingly.

The program runs always through each code line but the instructions are only executed if the execution condition is TRUE.

Debugging in step mode

In step mode the debugger will always step through all valid lines of the ST editor even if the control condition is FALSE and therefore the statements are not executed. You can run the program to the next valid line by pressing <F10> (Step over) or <F11> (Step into).

Example

Results of debugging in step mode through the following ST-editor code:

Debugging in continuous mode through inserted breakpoints

Breakpoints are inserted to be executed always independent from control conditions’ results. You can run the program to the next breakpoint by pressing <F5>.

Example

Results of debugging in continuous mode through the following ST-editor code with three breakpoints inserted:

Debugging in continuous mode through explicitly programmed breakpoints

Explicitly programmed breakpoints are executed in dependency of the control condition. You can run the program to the next breakpoint by pressing <F11>.

Example

Results of debugging in continuous mode through the following ST-editor code:

Modified on: 2019-12-10Feedback on this pagePanasonic hotline