Remote Django debugging on VM with git
I have a local Ubuntu VM where an existing Django app lives and runs. I host the VM on a Windows 10 machine and use pyCharm to remote debug the app via pyCharm and a mapped drive that points to the source code on the VM.
My current issue I have is regarding pyCharm's use of git on a mapped network drive (that points to my VM source code). Currently, I get git `fatal: failed to read object` errors in pyCharm if I try to use pyCharm's built-in git options to commit changes made on the network drive to Github. This is not surprising because I get the same kinds of errors if I try to use Windows git on that same networked drive.
2 questions:
- Is it possible and recommended to use pyCharm on Windows to develop an application on a directly local VM (i.e. debug and git)? Or does the best practice involve some sort of syncing between my Windows+pyCharm environment and my dev Linux VM.
- Is there a way to activate my virtualenv in Linux when remote debugging?
It would be great to have a video tutorial that delves into the subject of the complete Django development on remote machines -- including git and remote debugging.
请先登录再写评论。
Given all the hype about pyCharm 2016.3's ability for remote debugging, I'm surprised that this basic question about remote git and virtualenv has no responses from JetBrains staff.
Hi, John!
1. Could you please specify your question more detailed? Yes, it's recommended to develop your application locally and use remote tools only for running and debugging. You can configure automatic deployment and all your local changes will be send to the remote machine before running.
2. You can execute activation script as "Before launch" command in your Run configuration.
Hi Elizabeth,
Thanks for the update. I think I understand now: the best practice is to have a copy of the app code locally (on the same machine I'm running PyCharm) and (git) commit changes from that machine to a remote git repository (e.g. GitHub). Alternatively, I could install PyCharm on my dev VM directly which would avoid the remote debugging setup but is not ideal (requires Desktop OS).
-John