Building and Debugging Source Code
114
NetLinx Studio - Instruction Manual
Using Breakpoints (NetLinx Only)
While Single Step Mode allows you to execute a single line of code in the Mainline in Axcess systems, NetLinx systems
allow you to use Breakpoints to execute a single instruction in the source file. You can set a breakpoint on any line of
code (other than a comment) that is within the
DEFINE_PROGRAM
section.
The following is an example of a
SEND_LEVEL
breakpoint:
PUSH[dvLocalTP3,1]
PUSH[dvLocalTP3,2]
{
fTestLevel=fTes 1;
SEND_LEVEL dvLocalTP3,1,fTestLevel;
}
Note that semicolons are used in the example to terminate each line in a breakpoint. The only time that the semicolon is
absolutely necessary is when a breakpoint is set at the last line of code. To keep things simple, consider terminating each
breakpoint with a semicolon.
Setting a Breakpoint
1.
Place the cursor on a line of code in the
DEFINE_PROGRAM
section (other than a comment).
2.
To insert the breakpoint at the cursor position, right-click to open the Editor window context menu, and select
Toggle Breakpoint
, or use the Toggle Breakpoint toolbar button.
3.
A red arrow appears in the Editor window, to the left of the cursor position.
A green bar highlighting the line of code, and the execution arrow (a little green arrow) indicate the current
execution point.
To execute the next line of code, right-click and choose
Step Into
. You'll see the execution pointer advance
one line.
If you no longer need to single step, right-click and choose
Run
.
Clearing Breakpoints
To clear an individual breakpoint, or clear all breakpoints in a file:
To clear an individual breakpoint
- Place the cursor on a line of code containing a set breakpoint, and choose
Debug > Toggle Breakpoint
, or use the Toggle Breakpoint toolbar button to unset the breakpoint on that
line.
To clear all breakpoints in a file
- Choose
Debug > Clear All Breakpoints
, or use the Clear All Breakpoints
toolbar button.
Editing Breakpoints
Select
Debug > Edit Breakpoints
to access the
Breakpoints
dialog. Use the options in this dialog to toggle any
breakpoints set in the active (NetLinx) Source Code file (FIG. 182).
If you are not currently debugging, you won't see execution break until you start
debugging (Debug > Start Debugging).
FIG. 182
Breakpoints dialog
Summary of Contents for NetLinx Studio
Page 40: ...Working with Projects 28 NetLinx Studio Instruction Manual...
Page 148: ...Communication Settings 136 NetLinx Studio Instruction Manual...
Page 160: ...Working with Online Devices 148 NetLinx Studio Instruction Manual...
Page 178: ...File Transfer Operations 166 NetLinx Studio Instruction Manual...
Page 208: ...Tools Menu Options 196 NetLinx Studio Instruction Manual...
Page 229: ...Setting Program Preferences 217 NetLinx Studio Instruction Manual...