up Inquisit Language Reference

debugTrace function

This function sends messages to the Inquisit output window during the execution of the script.

Member of

<script>

Syntax

script.name.debugTrace(message)

Return Type

none

Parameters

Name Type Description
message string The message to write to the output window.

Remarks

This function is intended for debugging purposes. The function writes the value of the input parameter to the Inquisit Output Window. It can also be used to determine whether particular bits of logic are ever executed, or whether various properties have the expected value.

Examples

The following writes the count of a given trial to the Output Window (Note: 'this' represents 'trial.myTrial' in this context):

<trial myTrial>
/ onTrialEnd= {script.debugTrace(this.count);}
</trial>

The following writes a message to the Output Window when percent correct drops below 50 (Note: 'this' represents 'trial.myTrial' in this context):

<trial myTrial>
/ onTrialEnd= {if ( this.percentCorrect <= 50% ) script.debugTrace("Percent correct below 50, currently at <% this.percentCorrect %>");]
</trial>

Copyright Millisecond Software, LLC. All rights reserved.