I recently did this, it took some time to get it to work, but I think it's pretty simple if you know what needs to be done.
A little bit about what is going on:
There are 2 parts, a debug server, which is your computer (where pycharm works, so itโs a bit confusing), and a server that runs the application (which you can usually think of as a server, but at the moment a dev machine). This means that the code must have computers IP (debug server) and the correct port, and then they can talk and be happy and wrong. I mean debugging. When the dev machine runs the script, there will be a command that tries to connect to the debug server (your pycharm)
Actual setting:
First, set up the debug server, just follow the instructions here (skip the part about the egg we will be there), make sure you set the paths (therefore, the remote and local path leads to the root project, because it searches for files during debugging). Itโs also easier for me to use a fixed port rather than a dynamic one, because I donโt want to update the code on the server every time.
Note - you need to start the debug server so that the program can connect when debugging, do not forget about it.
Next we need to configure the dev machine. The first step is to install a debugging egg, which is easy to do by copying it anywhere in the dev machine and running easy_install <path to correct pycharm-debug.egg> (you can find where the egg is on your computer from these instructions ). The last thing to do is add code to connect to the debug server, pycharm generates it in the debug server configuration windows (from the first phase). 
Final note. I usually surround two lines in a function that checks -debug (using argparse) and only then tries to connect to the debug server.
Hope this helps, good luck.
Eytan source share