| Reference | Downloads | Github

How can I get an interactive debugging shell in the Coder?

pdb.set_trace() doesn’t seem to work: the prompt appears but no input is registered.

Basically, you can’t at the moment within the PsychoPy app. The Coder interface isn’t really designed to be a full-fledged IDE, just a basic editor for newbies to get going.

For a more sophisticated editor you should look into:

  • Spyder (open source)
  • PyCharm (commercial but with a free community edition that’s great - my personal favourite)
  • WingIDE
  • many others via google

It just isn’t worth us making this a priority at the moment given the vastly superior other options

Hi! How can you debug in PyCharm?
I wrote a full experiment using the PsychoPy library but once the window of the experiment opens I don’t have access to the “regular” debugging of PyCharm.

Thank you!!

@galaharon Set your window not to be full-screen. Fullscreen mode is designed to prevent you seeing any other windows for better timing precision

yes I know but then I can’t also debug, or am i missing something?
you debug regularly? while on the window pressing the keys in the experiment see what’s happening?
because for me it doesn’t work

thank you!

If you aren’t in fullscreen mode then you can switch between windows as needed. But yes, you would need to do so, typically. e.g. Pycharm doesn’t receive your keypresses while the PsychoPy window is receiving them (and vice-versa probably depends on whether you use the event.getKeys or the hardware.Keyboard)

1 Like