Add Remote option not shown in PyCharm - python

I am trying to set up a remote debugger with PyCharm on a Vagrant Machine.
I am following this PyCharm tutorial. However, the Add Remote option is not available for me. Just Add local and Create VirtualEnv.
Any idea why is this happening?

Just as a guess: are you using the free community edition of PyCharm? Unfortunately remote interpreters and remote debugging are only supported by the professional edition. You might take a look into the editions comparison on their website.
If you are using the pro version, we might have to dig a little deeper.

Not sure what host system you are using but if you don't mind a bit of delay, I was able to use Xforwarding over ssh and I pulled pycharm down from my remote system. (ssh -X) Pycharm detected it and gave a warning that it's updates are slowed but it worked.

Related

Run local code on remote interpreter (VS CODE)

I have some code on my local machine which I want to run with the python interpreter or python present on the remote server.
Purpose of doing it: some part of my code contains some spark code which does not runs on my local machine but the spark code runs fine on remote machine. But the code is not present on the remote machine.
Please mention the solution related to VS CODE
Please help me.
I tried solving it by resolving spark issue but machine is not compatible. Checked few things on remote works fine. I am positive my code can work on remote interpreter. I know pycharm support it in professional version which I cant access. Please help me for VS CODE.
Please install Remote-SSH extension in extension store.
Then you can select Remote-SSH: Connect to Host... from the Command Palette ( Ctrl+Shift+P).
You could read document for more details about remote control.

Visual Studio Code Remote Python Debug on Windows

Is it possible to remotely develop and debug Python code on another PC on the same network (both Windows 10)? If so, what is the best way to do this?
I tried mapping a network drive to the project folder on the remote PC. I could open the folder in vs code, but cannot get it to start my virtual environment on the remote machine to start debugging. When I do "Select Python Interpreter" and choose the appropriate venv on the remote machine it does nothing. The same process works fine if the venv is installed on the development machine.
I normally use WSL remote for C++ development and it works great but cant find any documentation for remote Windows development, just WSL, docker and SSH (maybe an option?)
Advice appreciated. Thanks in advance...

Code navigation for remote server in VS code

I have installed visual code in my mac to be able to access code to a remote server. I have installed remote-ssh and python packages for vs code and I have managed to connect remotely to my projects in server. However, my issue is while I can use python code navigation locally, I cannot do it in the server. Any ideas why?
Do I need to do any configuration in the remote server?
Check if the Pylance extension is installed on your remote extensions or not. I used to stick to this problem once so by installing the Pylance my problem was solved.

Is it possible to use remote vagrant based python interpreter when coding Visual Studio + PTVS

In our company we using vagrant VM's to have the save env. for all. Is it possible to configure VisualStudio + PTVS (python tools for VS) to use vagrant based python interpreter via ssh for example?
There's no special support for remote interpreters in PTVS, like what PyCharm has. It's probably possible to hack something based on the existing constraints, but it would be some work...
To register an interpreter that can actually run, it would have to have a local (well, CreateProcess'able - so e.g. SMB shares are okay) binary that accepts the same command line options as python.exe. It might be possible to use ssh directly by adding the corresponding command line options to project settings. Otherwise, a proxy binary that just turns around and invokes the remote process would definitely work.
Running under debugger is much trickier. For that to work, the invoked Python binary would also have to be able to load the PTVS debugging bits (which is a bunch of .py files in PTVS install directory), and to connect to VS over TCP to establish a debugger connection. I don't see how this could be done without writing significant amounts of code to correctly proxy everything.
Attaching to a remotely running process using ptvsd, on the other hand, would be trivial.
For code editing experience, you'd need a local copy (or a share etc) of the standard library for that interpreter, so that it can be analyzed by the type inference engine.

Python and Django IDE with remote editing?

I'm looking for an IDE that will allow me to edit remote Python projects and also has decent Django support, remote command execution, and maybe remote debugging. I've tried PyCharm and Aptana with PyDev but I'm not having much luck configuring them for remote editing. Thanks for your help!
I have Pycharm setup on a Ubuntu 10.10. The key is to use "sshfs" - it maps to my web-host - via ssh. Those are the pre-reqs : ssh access, sshfs. (unless you can figure out a way to map ssh to a windows shared drive).
So once ssh, sshfs are setup, I create a linux mount locally - so my webhost's directory appears locally as "/webhostx" .. From then on Pycharm (or WingIde or any editor) does not care that "/webhostx" is really a remote folder mounted locally.
If all else fails there's always Emacs (everything included :-) ).
Pycharm also has a remote debugging feature - I am in the process of testing it with my host (webfaction).
Emacs has tramp for remote editing on top of ssh, ftp or other protocols(works out of the box). nxhtml has support for editing Django templates (needs setup). I don't know about remote debugging. I've never done that.
Of course, Emacs is a lifestyle rather than an editor as most of its users will tell you so be warned.
Try WingIDE.

Categories