One possible method is to treat your Docker container as a remote host and use remote debugging: https://www.jetbrains.com/pycharm/help/remote-debugging.html