After the experiment is functioning without errors, it is important to completely test it prior to running participants. The Debug object is especially useful for testing an experiment. Use the Debug.Print command to send variable values to the Output window, and keep track of the progress of the experiment with a pencil and paper as well.
After running the experiment, examine the output on the Debug tab to view the values. Alternatively, the contents of the Debug tab may be copied to the clipboard and pasted into another application for more thorough viewing or analysis. A written-record and the Debug output should be compared to the data file to verify that all of the variables are being logged, the values are in the correct range, and the sampling is occurring as expected. It is important to test the script completely, including tests of unlikely responses and invalid ranges.