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:

<trial consent>
/ onTrialEnd= [script.debugTrace(trial.myTrial.count);]
</trial>

The following writes a message to the Output Window when percent correct drops below 50:

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

Copyright Millisecond Software, LLC. All rights reserved.