Is it possible to run only a part of a program in PyCharm?
In other editors there is something like a cell which I can run, but I can\'t find such an option in PyCha
PyCharm cell mode
Run Cell
and Run Cell and go to next
A cell is delimited by ##
Ref https://plugins.jetbrains.com/plugin/7858-pycharm-cell-mode
You can set a breakpoint, and then just open the debug console. So, the first thing you need to turn on your debug console:
After you've enabled, set a break-point to where you want it to:
After you're done setting the break-point:
Once that has been completed:
Pycharm shortcut for running "Selection" in the console is ALT + SHIFT + e
For this to work properly, you'll have to run everything this way.
You can select a code snippet and use right click menu to choose the action "Execute Selection in console".
I found out an easier way.
Execute Selection in Console
and reassign it to a new shortcut, like Crl + Enter. This is the same shortcut to the same action in Spyder and R-Studio.