Setting breakpoints within code
Previous:
-
for C debugging: all necessary sections/steps under "Preparations for C-debugging"
-
for ST/FBD debugging: Checking the state of the application
Set at least one →breakpoint in the code or the logic. This procedure depends whether it is a code or a logic.
Restriction for a debugging session for the built-in PLC Do not set a breakpoint onto a code line or for a FBD-logic that is run by several →tasks. This restriction results from malfunctions of the debugger, if several tasks are interrupted at the same time. |
Setting breakpoint within C-code or ST-code
-
Open the appropriate file or the appropriate object:
File with C-code
Double-click the file containing the C-code to open the file.
The filelcxx___name.c
contains the C-code for the elementname
as the name has been entered e.g. in the ST-code.xx
is replaced bypu
for a program, byfu
for a function block or a function, bydt
for a data type. Example: The filelcpu___counter.c
contains the C-code as it has been created for the ST programCounter
.File with ST-code
Double-click the ST-object to open the ST-editor.
-
Point to the border left of the code that is executed and for which you want to set a breakpoint.
Examples for code that is executed: →assignments, →calls,IF
statements
Examples for code that is not executed: comments, declarations -
Open the context menu and select Toggle Breakpoint. Alternative: Double-click.
Result: is displayed at the border of the code.
Setting breakpoint within FBD-logic
-
Open the FBD-object.
-
Open the context menu for an FBD-element and select Toggle Breakpoint. See "Setting breakpoints for the calls of blocks and value fields" for details.
Result: is displayed for the FBD-element.
Disabling, enabling or skipping the set breakpoints
Good to know | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
You are able to disable and enable any set breakpoint at any time. This is only possible, if the perspective Debug has already been opened.
You are also able to skip all breakpoints in one go, if the perspective Debug has already been opened.
If you want to have the breakpoints considered again, select the command Skip All Breakpoints anew or click the button again. Now the breakpoints are enabled or disabled – as the breakpoint has been before it has been skipped. |