Navigation stuff goes here


Command groups: Debugging

There are two special PsyScript commands created just for debugging. These commands should probably not appear in a finished script, but they're useful while you're developing and testing your script.

These commands work in all three development environments, not just the debugging one. Be careful to remove them before running your experiment with real participants.

Commands

halt

Tells PsyScript to stop executing the script immediately rather than allow it to reach the end of the main procedure. If you're debugging a piece of your script you might put the halt command immediately after it so you don't have to wait for the script to do things after that that you don't care about. The command notes in the log file that the script was halted rather than allowed to finish naturally.

halt


log to console value

Does the same thing as log except that the value appears in the javascript console of the browser instead of the PsyScript log file. The biggest advantage of this command is that it lets you keep your debug information separate from your experiment log. You can keep both the experiment window and the console window open and watch both while your script is running.

log to console doing focus point procedure now
log to console $varCounterSoFar


Technical notes

See also