Code Testing outside of experiment program

Is there a way to test the subroutines in the builder view to make sure, before you add them to the full experiment, that they work as expected. In Matlab, you can highlight and run pieces of the code.
I haven’t tried coder view but the problem with coder view is that it doesn’t always work the same way. Sometimes code written in coder view does not run in builder view.

Hi @patricia, the easy thing to do here is to encase your unwanted routines in a loop and set the nReps of the loop to zero. E.g., see below where nReps in the loop “doNotRunThisLoop” are set to zero, and thus only “playThis” routine will run:

1 Like

Genius idea, thanks.
Just to clarify - I have programmed a series of questionnaires, therefore, to run one questionnaire, I would put “play this” before it and “do not run this loop” after it?
I could move these to wherever I needed to test the code?
Brilliant.