Debug a Simple Data Function
When you write a TERR data function to add to your Spotfire analysis, you can use the built-in debugging feature in Spotfire Analyst to examine the output debugging log, and you can find and fix problems with the data function directly from within the Spotfire Analyst environment.
The three tasks in this section introduce the debugging output, introduces a technique for checking your code at different points in its execution, and exporting the results of the data function to analyze outside of Spotfire Analyst.
- Debugging a Simple Data Function
Create a simple data function and then examine the debugging output in Spotfire Analyst. - Adding a cat Statement to the Data Function
Acat
or aprint
statement is useful for understanding your code's behavior. For example, you can use it to check the success of a condition, or to make a note in the output at a specific time when the code is running. - Exporting the Data Function Results
Being able to examine the data and the code outside of Spotfire Analyst is an important capability in developing robust data functions.
Parent topic: Data Functions