We will need to configure some stuff here!įirst, make sure that the just configured python interpreter is selected. By the end of the process you should have the interpreter setup in your pycharm.Ĭlick Edit Configurations from the dropdown menu in the upper-right corner: Now pycharm will start setting up the helpers on the remote machine.
You can figure this out for yourself by connecting to your instance, loading the virtualenv and asking for the python interpreter path, just like this: The only “special” thing here is the python interpreter path.
Go ahead and fill up the form, it’s pretty straightforward. Just go to your project’s Preferences and select Python Interpreters, click on the cog in the upper right corner and select Add Remote. Also, make sure to connect to your EC2 instance following the following instructions.Ģ - Setup the remote python interpreter from your EC2 instance. Make sure to keep this window open as we will be copying and pasting stuff from it. Just go to the EC2 panel, select Instances, click on the appropriate instance and click Connect (yeah, the IP shows up at the bottom but as we will be using this later, we rather do it this way). This is how awesome django app looks like:ġ - Get the public IP of your EC2 instance. You can check the official AWS documentation. If you are using autoscaling and have more than one instance, you might need to repeat the request until you hit the instance you chose as the remote interpreter. This guide assumes that you have the keys to connect to your EC2 instance and that you have a django application deployed directly in EC2 of through Amazon Beanstalk. Pycharm is by far the best IDE to develop django apps, offering a very nice set of features to do remote debugging. Sight no more! This Karumi contribution is here to throw some light on this matter!
#Set up pycharm for django development how to
Remote debugging is a pretty sweet addition to your dev toolbelt, but sadly the amount of documentation out there on how to debug django apps running on EC2 is very scarce. Tagged in: Aws, Remote, Debugging, Beanstalk, Django Davide Mendolia 03 July 2014 How to Remotely Debug Django Apps Hosted in EC2 with Pycharm