Describes how to test CFL code, try out the results of functions, test layout coding, etc. quickly and easily by using Cyrious's debugger or to diagnose what part of a how-to_make_coding_easier_with_the_formula_builder code sequence is not producing the results you want or expect.

If you are an “amateur” like most “Users”, this is the most valuable tool in the Cyrious library. This capability permits every user to quickly see the results of CFL code or test code which is in a pricing form, formula, or layout to see which formulas, variables, modifiers, constants, etc are producing what results. You can copy code from your Product Pricing window and paste it in this window and then remove or “comment out” sections to see exactly what every piece of code is returning/

When using the CFL debugger to test code, you will need to have an Estimate or Work Order open in Edit mode and the product for which the code is written the selected Item.

  1. Oen an Estimate or Work Order and Select/Hightlight the line item for which the code you wish to test is designed.
  2. On your keyboard click Control/ALT/SPACEBAR. This will bring up a window where you may enter CFL code. When you click on Evaluate, you will see the results of the code.

**SCREEN SHOT OF DEBUGGER SHOWING THE DESCRIPTION VARIABLE OF THE PRICING FORM BEING "TESTED"**

Note the result of the code is shown on the "RESULT" line at the top. It corresponds to the value in the Pricing Form behind it.

  1. For Help on finding Code and Variables you can click again on CTL/SPACEBAR and you will get a dropdown list of most of the Variables, Functions, etc. available in CFL. This tool tries to guess what you are looking for and fill it in for you, but you can just scroll through the whole list to look for something you think might work for what you are trying to do.

**BELOW IS A SCREEN SHOT OF THE CODE HELPER/SEEKER**. (See Item 4, "Caution Using the Helper")

  1. Caution Using the “Helper”: The CTL-SPACEBAR function has some fragility to it. You can exit this window by Pressing ESC. However, if you use the backspace to delete letters or certain other key combinations, you may initiate a variety of error messages suggesting the code in your Pricing Form is flawed and ultimately be forced to “Force Quit” and restart Cyrious.

//Additional Hints
// The double slash tells CFL that this line is not live code but a comment on the code
{The curly brace is used like the // double slash to make
a section of code a "comment.  Everything between the Open and Close curly brace is treated like a comment
}
//These codes are important to include brief descriptions
of what your code is doing but also handy ways to exclude
certain sections of code from your formula to test what other parts are doing.

Contributor: Steve Gillispie, Acorn Sign Graphics

Date: 07/31/2009

Version: Control 4.3_

You could leave a comment if you were logged in.