# 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.