Being an long-time R user I got used to debug my R-Scripts in console (for whatever reasons I rarely use breakpoints in R-Studio). Programming in Python I would of course prefer to have both. It is possible e.g. in PyCharm IDE:
0) set a breakpoint, debug your file
1) switch to console window
2) click on command prompt icon
3) execute arbitrary code in command line