Programming
95
etLinx Studio (v2.4 or higher)
To enter debug mode:
1. Open and compile a Source Code file (that contains at least one variable), if you have not 
already done so. The file must be successfully compiled before you can enter debug mode.
2. Choose Build > Debug (or click the toolbar button) to open the Watch window. If this option is 
disabled, make sure your Master Communications Port settings are set to connect to your 
Master Controller.
3. Right-click inside the Watch window to open the Watch Window context menu.
4. Click Add to insert a new variable in the Watch window. A box appears in the window, with a 
cursor blinking in the Name column.
5. Type the syntax of the variable exactly as it is defined in the code and press the Enter key. The 
value of the specified variable appears next to the variable (in the Value column).
6. You can select different view formats for the Value by right-clicking on the line containing the 
variable/value, and clicking on Display in the Watch window context menu. This opens the 
Display sub-menu, containing the following view options: 
To exit Debug mode, close the Watch window.
Using Single-step Mode
In Single-step mode, program execution is suspended between each pass through mainline, 
allowing you to test programs one line at a time. Single-step mode works differently in NetLinx 
than it does in Axcess:
 In NetLinx systems it executes a single instruction in the source file
 In Axcess systems it executes a single line of code in the Mainline
To use Single-step mode:
1. Right-click on a watched variable and choose Debug > Single Step (or click the toolbar 
button) to put the Master into single-step mode.
2. With the watched variable selected, select Debug > Single Step (or click the toolbar button). 
This command executes mainline one time and breaks.
ASCII Display displays the value of the watched variable in ASCII format.
Decimal Display displays the value of the watched variable in decimal format.
Hexadecimal Display displays the value of the watched variable in hexadecimal format.
Octal Display displays the value of the watched variable in octal format.
Binary Display displays the value of the watched variable in binary format.
In NetLinx, you can use breakpoints with single-step mode. When the breakpoint is 
encountered (and the program is suspended), you can single-step without a watched 
variable reference.