Testing new script functions
Previous  Top  Next

Testing new scripts is relatively straight forward. There are several aids to testing available in CatTools.

Within the Infolog tab you see messages appear while an activity is running. The level of messages that appear is selectable via a drop down list near the bottom of the window. By selecting level "4) Show debug events and above" you get to see all possible messages being displayed during the running of an activity.

You should be aware that all the Infolog messages are logged to a file called InfoLog.txt in the root CatTools folder. This file can get very large quickly and can be purged by selecting the Delete entry from the CatTools File menu and deleting the log file.

The script function cl.Log 4,"message" is readily added to your new scripts to display level 4 messages where ever needed to help test the new functions.

Under the File menu of CatTools there is an entry "Enable Capture Mode". This turns on the logging of the conversation between CatTools and the device, and it creates a disk file in the \Debug folder. This can be extremely useful when the script does not appear to be communicating correctly with the device after entering a command. The scripting mechanism waits for known prompts when issuing a command to the device, but eventually times out if an expected prompt does not appear. The debug capture log shows what the device actually sent to CatTools, and you can adjust your code accordingly.