up Inquisit Language Reference

debugbreak function

Stops script execution and opens the Debugger Watch Window.

Member of

<script>

Syntax

element.name.debugbreak(condition)

Parameters

Name Type Description
condition boolean Optional. The execution stops if true, otherwise the script continues running.

Examples

The following stops the script if the user responds with the space bar:

<trial consent>
/ ontrialend= [if ( trail.consent.response == 57 ) script.debugbreak();]
</trial>

The following stops the script if performance dips below threshold:

<trial sometrial>
/ ontrialend= [if ( trial.sometrial.percentcorrect <= 50% ) script.debugbreak();]
</trial>

The following stops the script if the number of items in a list is 0:

<trial sometrial>
/ ontrialend= [script.debugbreak(list.probabilities.itemcount == 0);]
</trial>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.