Does the script need to be run from bash? If not you could add a new Python run configuration (Run -> Edit configurations...). This can be run in PyCharms debug mode and will stop at breakpoints defined in the GUI. Rather than having to use set_trace, you can toggle the 'Show Python Prompt' button in console view to get a prompt so you can interact with the programme at the breakpoint.

Email codedump link for Using the inline Debugger of PyCharm when running a bash-Script (.sh) within the PyCharm Terminal