I am running my code in Pycharm
from Terminal. Is it possible to debug the code and put breakpoints inside the code during a run from terminal?
I don't know anyway to do this through the terminal, but the way I currently do it is:
Run
> Edit Configurations
> Add new configuration (the green +
button)Python
Script path
, Parameters
, and other configuration fields.Run
> Debug...
)With the right configuration the result should be the same as running the script in a terminal.
I find the above process a little tedious. A PEP 553 breakpoint()
might be nicer. It requires Python 3.7 and is not implemented yet. See the related issue.