while debugging in devtools, is there a way to directly access the variables in the script, or maybe even change their values with exp. still running (but paused)?
For example, is it possible to get expInfo[‘participant’] in console while debugging?
Can its value be changed using console and then have an effect on the exp.?
As you can see, expInfo[‘date’] is defined at the beginning of the exp. (actually, let it be any variable that’s defined in the exp.)
but I still haven’t find a way to access them in the console; is that even possible?
You can always pass an object to the window by typing:
window.thisObj = thisObj
in a JS code component. Then in developer tools you can type window.thisObj to access it (where thisObj is the name of a component from your PsychoPy experiment).
In addition to the above, if you access developer tools e.g., by pressing F12 in your experiment, you can add a breakpoint to your javascript code to pause the experiment at that point, e.g., where you define expInfo. Then step through using the buttons highlighted in the image below, and view your variables in the console.