Unfortunately, PyCharm does not (by default) encourage the wonderfully productive development pattern of ``python -i`` -- running the script and breaking into the interactive prompt afterwards. IDLE does this and it's excellent for teaching. Any other technique and the students are much less likely to develop the habit of testing/debugging code interactively in the REPL.
Even if you do invoke the interactive mode in PyCharm, each execution creates a separate prompt, causing confusion. I'll admit I'm not the most skilled PyCharm-user. Perhaps there's a way to make it work like IDLE?
I think I tend to agree here. I've taught a few terms of the Python courses through @codeclub to primary school children in the UK (aged 10-11) using IDLE and it works well. It's also worth considering that IDLE is a relatively lightweight install and on the network at the school that I teach at, everything is extremely locked down and installing anything causes an amount of pain. That said I think I'll still investigate.....
This is a bit different but in PyCharm you can set a breakpoint and then in the debugger open up a window where you can evaluate arbitrary expressions with that context before continuing.
I like to introduce debuggers/breakpoints after teaching functions and classes. That way I can explain the purpose of a debugger as bringing back the interactivity of the REPL despite hiding variables in local scopes.
The run configurations let you check a box that drops you into the interpreter console afterwards. If you install iPython, it will be used. Is that describing what you're looking for?
Not quite. If you re-run the script it creates a new console rather than restarting in the current. That leads to an awkward proliferation of consoles with no keyboard shortcut to close them. I encourage my students to run code very frequently.
Even if you do invoke the interactive mode in PyCharm, each execution creates a separate prompt, causing confusion. I'll admit I'm not the most skilled PyCharm-user. Perhaps there's a way to make it work like IDLE?