
Building and Debugging Source Code
111
NetLinx Studio - Instruction Manual
Debugging Source Code Files
NetLinx Studio contains several useful options for debugging your Master Controller and Source Code files.
In order to begin debugging, your computer must be connected to a Master Controller, and you must have a compiled
Source Code file active.
To use debugging, the
Build With Source
option must be selected in the Axcess Compiler and/or NetLinx
Compiler tabs of the
Preferences
dialog, before the file is compiled.
You cannot compile, send/receive files, or change port settings while the program is in debug mode.
Avoid declaring variables as volatile whenever possible, since volatile variables will not display their contents
during the debug session.
NetLinx character strings by default are displayed in current length mode, while all other strings (including
Integer strings) are displayed in total length mode.
Master Controller Debug Options
The Watch Bar is displayed when
Start Debugging
is selected from the
Debug
menu, or via the Debug Watch toolbar
(FIG. 179).
The Watch Bar is a dockable window that allows you to view and edit the contents of variables within a compiled
program. Also, you can control the execution through each pass of the mainline of a compiled program. Once
Start
Debugging
has been selected, additional options in the Debug menu become available:
The following options only apply to NetLinx code:
The Debugging feature allows you to view variables declared within the scope of a
Function and or Call procedure. However, stack and parameter values are not
editable. If you attempt to edit either the stack or parameter values, a warning
message is displayed.
FIG. 179
Watch Bar
Start/Stop
Debugging:
Ability to toggle the debug state of the application. There is no limitation on then number of NetLinx
variables that can be watched in the Debug Watch Bars.
Note: A maximum of 10 watch variables are allowed when debugging an Axcess master controller.
Step Mode:
Enable/Disable Step mode causes the Interpreter to break after each execution of the mainline.
Watch variables are always updated after each pass through mainline. To continue program
execution while in Step mode, you must invoke the
Step
command again.
Note: This option is for Axcess Masters only.
Single Step:
Execute one line of a source code file at a time for a NetLinx Master or execute one pass through the
mainline code for an Axcess controller.
Run:
To continue execution after a Single Step operation or from a toggled break point.
Run To Cursor:
Execute the program and break on the line of code where the cursor is residing on the screen.
Break:
Stop execution of the program and highlight the line of code on the screen.
Edit Breakpoints:
A dialog appears listing all the break points within the code.
Toggle Break
Point:
Toggle a break point on the screen where the cursor is residing.
A red diamond appears next to the line of code to signify a break point.
Clear Break
Points:
Clears all the break points within the source code file.
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...