Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

Further techniques to use for debugging Script programs.

Issue

Use of the Building Operation Script editor and general Script programming is covered in the Training courses and technical reference guide, what other techniques can be used to debug a program?

Environment

 Building Operation Script editor.

Cause

Often additional techniques are required to debug Script programs, especially when attempting to analyze, modify or fault find other people's code.

Resolution

Some techniques you can use for debugging your program and isolating problems are:

  1. Add in additional line labels to the program to isolate where the program is disabling or failing, if it disables you will be able to see the "CurrentLine" it has failed on and therefore know which line of code is causing the problem.
  2. Use the Trace feature to step through a program and monitor the binding variables, stepping through each line of code to ensure the values are all set as expected.
  3. Even if a program does not disable you can use the "Stop" keyword in the program, it will act as a break in the code and you can look at the values of the various variables, this may be a useful alternative to the Trace feature.
  4. Use the Watch window and the Binding Variables window to show the values of the various objects, when used with the above 2 techniques it allows you to accurately trace a program flow.
  5. Ensure all of the code used is compatible with the Script programming rules and that Continuum Plain English programs are not just used without conversion. Check the Plain English and Script Difference Guide.
  6. For programs in an i2 or b3 controller, ensure none of the Program size limitations are exceeded, see Lessons Learned Article #2580 .
     
Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
2 weeks ago
Updated by: