The
/ commands are available in offline and in online mode, in the debug context as well as in the breakpoints view.The breakpoint or a new data breakpoint in the active application. In online mode, you can additionally define execution points.
/ dialog box opens. It allows you to define the position and the conditions for a newIn order to use data breakpoints, the device description file must include target entries that correspond to your controller.
Also refer to the corresponding functions in the dialog box.
For setting a breakpoint at the cursor position, refer to the command.
Element |
Description |
---|---|
|
The selection list offers the POUs available in the active application. Select the one where you want to set a breakpoint. |
|
The selection list offers the possible breakpoint positions of the selected POU. Depending on the editor type, these positions are defined by line and column numbers (text editors) or as network or element numbers (graphic editors). In case of a function block, ) is added additionally. You have to decide whether the breakpoint should be set in the implementation or in an instance. If it requires setting during the implementation, leave the option disabled. If it should be set in an instance, enable the option to select the instance. |
|
If the selected POU is a function block and this option is disabled, the breakpoint is set in the implementation body of the POU (refer to the element). If you want to set the breakpoint in an instance, enable the option and select the instance. |
The
tab allows you to define conditions that cause the program execution to stop at the breakpoint:
Element |
Description |
---|---|
|
|
|
Enable this option if the breakpoint only should be effective in case the POU where it is placed is processed by certain tasks. This allows you to set a specific task to stop at the breakpoint within the POU and not in other tasks, which also use the same POU. Refer to Breakpoints and stepping in applications with multiple tasks. The tasks defined in the project will be listed for selection. |
|
|
|
The program will stop at the breakpoint. |
Alternatively: |
The program will not stop at the breakpoint until the breakpoint has been reached the number of times defined (Enter the desired number or select it in the number field): |
|
|
|
If supported by the runtime system, you can use conditional breakpoints. Consult the Programming Guide specific to your controller to see if it supports conditional breakpoints. The condition can only be specified in online mode. The specified condition is evaluated. Only if the result is TRUE, the program will stop at this breakpoint, the code of the execution point will be executed. You can enter valid boolean expressions as condition. Example:
NOTE: Using conditional breakpoints slow down the code execution even if the condition is not TRUE.
|
The
tab allows you to modify the variable for which a data breakpoint is set:
Element |
Description |
---|---|
|
|
|
Number of bytes of the specified variable or memory address which is monitored. When a new variable or memory address is specified, a value is assigned that matches the data type. The maximum size and number of data breakpoints depend on the target system:
Example 1:
Example 2: |
Element |
Description |
---|---|
|
The breakpoint becomes an execution point. This means that the processing is not stopped at this point, but the given code is executed.
Execution point enabled:
Execution point disabled:
Execution point of a data breakpoint enabled:
Execution point of a data breakpoint disabled: |
|
Enter the code to be executed. The following restrictions apply:
Additionally, this restriction applies: The called functions and properties must match at least one of two following conditions: 1. In the dialog box, the option is activated.
2. The following attribute is added above the declaration of the function/the property: |
|
This option is available if the option dialog box. If the message should contain the present value of a variable, insert the variable name enclosed in curly brackets. is activated in theExample:
The present value of variable |
|
Select the option to activate the breakpoint.
Deselect the |