Navigation stuff goes here


Concept: Runtime modes

The three runtime modes

PsyScript has three runtime modes. Here they are in the order you might want to use them:

allows experimenter notesshows script and progressruns as a web pagetiming accuracy
'Run' buttongood
'Debug' buttonpoor (interupted by debugging)
package for webpoor (different devices)

The 'Run' button

This button runs the experiment in a window which has the programming that does the best job in measuring timings to the best reproducability, accuracy and precision. This is the mode you will use to run your experiment on real participants.

The 'Debug' button

This button runs the experiment in a window which can show lots of details on the display while your program is running. It's useful if you are tackling puzzling behaviour, or checking to see that your script works the way you think it does. Unfortunately in this mode PsyScript has to spend lots of time tracking the way cells, variables and tables change, so you will see little pauses while the script is executed and some recording of timing will not be accurate.

Packaging for the web

This mode is good for letting participants run experiments on their own computers/devices in their own home. PsyScript experiments run fine on all browsers which implement HTML5 correctly. This does not include Internet Explorer.

Unfortunately if you run the same experiment on different computers and/or devices, the accuracy and precision of timings measured will vary with how fast each devices is and which browser is used to run the experiment. Also, different devices scan their buttons and touchscreens at very different rates, meaning that the devices reaction time to the user's reactions differs from device to device. So allowing users to run an experiment on their own devices means you lose consistency in measurement of reaction times.

However, many PsyScript experiments depend only on the answer given and not on how long it takes the participant to give them. So this is still a much-requested way to use PsyScript.


Debugging mode

This rest of this page is about the ways in which debugging mode can be useful for you while developing your script. As your script is being executed it can show PsyScript's progress through your script, the values of variables as they're being changed, the log file as new data are being logged, the amount of data left in each table, and the positions, status and contents of each cell. It pauses after executing each line of code, so you can watch all those things changing and spot errors as they occur.

The drawback to this mode – the reason it's not used when running the real experiment with real participants – is that even with the pause between lines set to 0 seconds all this logging and displaying takes time, and PsyScript is consequently slower and less predictable when measuring reaction times and when doing its own timing for stimuli. You can see this by using the count-up timer to measure how long a command like "wait for 1 second" actually takes.

Here is a list of the keys used to control the debugging displays. They are all alt-key combinations. The alt key works like the shift key. In other words 'alt-k' does not mean "Hit the alt and k keys at the same time.", it means "Hold down the alt key while pressing the k key.".

alt-, decrease the pause time between commands by .5 seconds
alt-. increase the pause time between commands by .5 seconds
 
alt-c show or hide details about cells
alt-l show or hide the log output
alt-s show or hide the script
alt-t show or hide details about tables
alt-v show or hide variable values
 
alt-d equivalent to doing all of alt-c alt-l alt-s alt-t alt-v
alt-r resets all the debugging displays to their default positions

You can also double-click the title of a debugging display to show or hide it, and drag it about to move that area. PsyScript remembers the position and state of each of these areas. To make PsyScript forget your customised positions and return each display to its default position, use alt-r.

There are also 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.

See also