herokupydevpycharm

How to set up Pydevd remote debugging with Heroku


According to this answer I am required to copy the pycharm-debug.egg file to my server, how do I accomplish this with a Heroku app so that I can remotely debug it using Pycharm?


Solution

  • Heroku doesn't expose the File system it uses for running web dyno to users. Means you can't copy the file to the server via ssh.

    So, you can do this by following 2 ways:

    1. The best possible way to do this, is by adding this egg file into requirements, so that during deployment it gets installed into the environment hence automatically added to python path. But this would require the package to be pip indexed

    2. Or, Commit this file in your code base, hence when you deploy the file reaches the server. Also, in the settings file of your project if using django , add this file to python path:

    import sys
    sys.path.append(relative/path/to/file)