microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.31k stars 1.18k forks source link

RFE: Support Remote Interpreter #79

Closed DonJayamanne closed 5 years ago

DonJayamanne commented 6 years ago

From @satyenr on May 13, 2016 3:37

The ability to run code on a remote machine is awesome. You can develop on a Windows PC or a Mac while running and debugging on a remote Linux server. PyCharm supports such a feature - https://www.jetbrains.com/help/pycharm/2016.1/configuring-remote-python-interpreters.html.

Having a remote interpreter also helps when the remote machine already has a functional Python environment - possibly managed by someone else - which you don't want to/can't replicate on your local machine.

Copied from original issue: DonJayamanne/pythonVSCode#123

preachermaan commented 6 years ago

@sandys

my particular comment (and indeed this entire bug) is around remote debugging.

No it's not. It's about support for a remote interpreter. Debugging is just one aspect.

msholty-fd commented 6 years ago

I'm interested in this regarding Python and Javascript development on docker. I have a similar issue in a javascript repository I have where I want to use docker but all of my node_modules binaries like typescript and tslint that my extensions depend on don't exist, so my editor underlines everything in red.

echo-ray commented 6 years ago

Is it possible that IntelliSense work with code on remote workspace?

dgraton commented 6 years ago

@qubitron, the million dollar question is... Do we have an ETA on support for remote interpreter capability?

valignatev commented 6 years ago

@dgraton 1 dollar answer is... No, you don't have to be in MS team to know that.

qubitron commented 6 years ago

@dgraton we don't have an ETA at this point, we are currently working to make sure we understand the requirements for the feature and will report back here when we have more details to share!

To address some of the questions on the thread: by definition features such as IntelliSense and linting would work with a remote interpreter, as I think that's what folks are asking for here.

michaelklachko commented 6 years ago

Filled out the survey, and while describing my use case I realized that the ideal solution for me would be developing in a web browser, ala repl.it, and deploy to remote servers from there. Actually, now that I think about it, even better would be if Github had a decent editor, and allowed remote deployment.

My code already lives on Github, and currently every time I want to make a change I have to do the following, using any of the local machines I happen to be using at the moment (either my work desktop, or my laptop):

  1. pull the latest version from Github,
  2. make the change (using PyCharm)
  3. deploy and test the change on one of my remote GPU servers (again using PyCharm)
  4. when satisfied, push back to Github.

What I want instead:

  1. Make the change directly on Github (it needs a better browser based editor though)
  2. Deploy to remote server directly from Github (without copying to local machine first)
  3. (optional) it would be nice if I could see the output from remote server right in Github (in the browser), so that I wouldn't need to open any ssh session from my local machine to the remote server.

Does this make sense?

xfxf commented 6 years ago

@michaelklachko that request has absolutely nothing to do with this VSC feature request - i'm not sure why you've written that here?

michaelklachko commented 6 years ago

@xfxf this feature request is about running code on remote servers, correct? Currently I have to use PyCharm to do it, because VSCode does not support it. @qubitron "wanted to learn more about my needs, setup, etc", so I described what I actually want. Knowing what users actually want is useful for deciding whether to implement a feature.

austinbutler commented 6 years ago

@michaelklachko what you wrote just sounds like a feature request for Github rather than VSCode.

michaelklachko commented 6 years ago

@austinbutler I don't see why VSCode can't be integrated into Github as the online code editor, especially now that MS owns GitHub.

qubitron commented 6 years ago

@michaelklachko integrating VS Code into the GitHub online code editor is a neat idea, though I consider it out of scope for the Python extension. You could submit this suggestion in the Microsoft/vscode repo for the core VS Code team to consider.

KyeRussell commented 6 years ago

@michaelklachko I still cannot see how this is related to the thread. You appear to have conflated several things. You can almost certainly accomplish your originally stated goal with a CI pipeline, which is easily searchable online. Again, this is hardly related to the code editor you use.

This issue is highly subscribed to and quite unnecessarily noisy. As previously requested, please stay on topic.

michaelklachko commented 6 years ago

@qubitron ok, good point.

To be more on topic, here's one issue I have with PyCharm remote deployment: it does not sync git state with remote servers. Switching git branches on my local machine, and deploying to a remote server results in upload/overwrite. This causes unnecessary traffic/delay if the branches are significantly different. A solution would be to make remote servers git aware.

preachermaan commented 6 years ago

@michaelklachko I'm being kind, this is not a good idea. I'd advise reading up on source control and git best practices, CI and general software development lifecycles. This will solve your problems! Not new feature requests.

ghost commented 6 years ago

Still eagerly checking this issue everyday, how's that survey going?

clumsykun commented 6 years ago

don't like ptvsd way. PyCharm-like remote debug!!! please...

ghost commented 6 years ago

So my pycharm license expires in 5 days... to buy or not to buy? Any updates here @qubitron ? edit: well excuse me for being impatient and wanting to use VScode, just inquiring about that questionaire, and if something is happening with this soon, or if I shouldn't hold my breath. /edit

nffdiogosilva commented 6 years ago

I'm a little bit tired of receiving notifications from this thread, of people asking for this feature and not seeing the business model do this once and for all. At least give us a date, or close the thread for good.

woile commented 6 years ago

Sorry to add more noise, but I'm also tired of comments adding noise, I would suggest changing the configuration to allow only contributors to add comments.

ghost commented 6 years ago

image

KyeRussell commented 6 years ago

No dude, you’re wrong. I want to stay subscribed to the issue so I can see constructive discussion or updates pertaining to the functionality. Constantly asking about this is childish.

Please mark this as contributors only as people obviously can’t be trusted.

brettcannon commented 6 years ago

We are going to lock this issue as no one has a convenient work-around to share with people at the moment and to keep notifications down to just to updates we may share in the future.

I will say that we are actively working on a design to solve this with the VS Code team itself. I can't give an ETA since this is a cross-team collaboration and the work isn't finished yet, but please rest assured we are not ignoring this feature request.

qubitron commented 5 years ago

Hi folks, we are closing this as support for remote Python interpreters is enabled by the new Visual Studio Code Remote extensions we are unveiling today at PyCon!

Learn more at... VS Code Blog: https://code.visualstudio.com/blogs/2019/05/02/remote-development Python Blog: https://devblogs.microsoft.com/python/remote-python-development-in-visual-studio-code/

If you are at PyCon stop by our booth for a demo.

satyenr commented 5 years ago

Awesome! Although my workflow has changed significantly since I opened this ticket — and I write more Java than Python these days — I am looking forward to trying this out! Thanks for implementing this!