How to open the remote file in vscode without vscode server? - visual-studio-code

I am using the vs code for most of my development, but often I am accessing the FreeBSD system or low-resource machine which cannot handle having vs code server.
is there any way to open a remote file, without vscode server?
only basic edit capability is enough.

Related

How does the local vscode client manipulate files in the remote machine?

With the remote-ssh extension, we can use vscode's remote development feature now, which means we can access the files in a remote machine from local vscode. And I found except the remote-ssh extension, there is a vscode-server working on remote machine to communicate with local vscode.
Looks like it's the bridge between local vscode and the file system in remote machine, which say vscode access remote files through the .vscode-server. But when I read vscode's source code, I still didn't find which protocol do they used to communicate, looks like it's not http, maybe it's ssh, but I still didn't get the details. Does any one know the details between local and remote on access remote file system? Such as how does the client initiate a file read, and how does the remote return the file content to the client, which protocol they use. And how remote executes command from local, such as the git commands in source control.
We can find some source code of the vscode-server in vscode:
https://github.com/microsoft/vscode/blob/main/src/server-main.js
https://github.com/microsoft/vscode/tree/main/src/vs/server/node
not a complete answer but the extension that provides the remote connection is Microsoft/Github's "remote-ssh" (https://code.visualstudio.com/docs/remote/ssh). VS Code uses the ssh channel for effectively a peer-to-peer proprietary exchange between the local and remote machines after bootstrapping the process by using the ssh connection to issue commands to install their VS Code Server and its dependencies.
VS Code extensions generally have a link in their info to a Github repo containing the source but in the case of remote-ssh the repo is for feedback only & the code does not appear to be open source.
(https://github.com/Microsoft/vscode-remote-release)
Note the remote-ssh extension is using remote code execution primarily to "take advantage of VS Code's full feature set" (presumably including remote build and debugging) rather than simple file access. That extension does provide remote file access, but there are far simpler extensions such as ftp-simple which provide only that.

Visual Studio Code Best method for Remote Workspaces

I need to handle remote workspaces in VS Code. This will allow me to edit remote source files as if they were on my local machine. Either SFTP or FTPS are the only available options, support for both would be nice. Does VS Code handle these protocols well on its own or do I need a plugin? I am familiar with creating a new SFTP/FTPS account in another IDE and i'm hoping VS Code does the same.
Should I not be using VS Code for this and instead be using maybe VS Community Edition?

Can I add a remote Python interpreter (via SSH) to a local VSCode environment (i.e. a hybrid local/remote SSH setup)?

I have VSCode set up with the "Remote - SSH" extension, and I am able to run a local VSCode window as the face of a full remote environment. Really cool.
However, I would also like to be able to set up a local VSCode environment which loads files from my local filesystem but runs them on a remote Python interpreter (via an SSH connection).
I am hoping I can run all the regular interactive Python REPL stuff using the remote kernel (e.g. show variables, etc). It seems like I should be able to somehow add a remote kernel and then select it via "Python: Select Interpreter", but I can't figure out how.
In the past I was able to configure such a setup in JupyterLab using the "remote_ikernel" package.
Is this possible in VSCode? I've found tons of documentation on the full remote setup, but haven't located information on this hybrid kind of set up.
I found a related bug report which discusses mixing local and remote filesystems (not interpreters).
I suspect that the same difficulties it describes for filesystems may be similar reasons for why local files can not be easily fed into remote interpreters.
The full thread is here for reference:
https://github.com/microsoft/vscode-remote-release/issues/706
The specific quote:
Having a mixed workspace would require that a workspace extension can be active both locally and remotely. Currently an extension can only be active once, either locally or remotely. So this is currently not possible and we have no plans to support this.
The recommendation is to have separate windows open for the local and remote workspace.
So it sound like this is a feature that is not currently supported.

Is there any extension in Visual Studio Code , which is similar to Tramp Mode in Emacs?

TRAMP (Transparent Remote Access, Multiple Protocols) is a package for editing remote files, similar to AngeFtp or efs. Whereas the others use FTP to connect to the remote host and to transfer the files, TRAMP uses a remote shell connection (rlogin, telnet, ssh). It can transfer the files using rcp or a similar program, or it can encode the file contents (using uuencode or base64) and transfer them right through the shell connection.
It seems like as of now there is at least one similar package to Tramp mode for VSCode. I couldn't directly find in the documentation how you would open a remote shell inside VSCode, but it seems like it would have to be possible given the rest of the plugin.
https://code.visualstudio.com/docs/remote/ssh
https://code.visualstudio.com/blogs/2019/10/03/remote-ssh-tips-and-tricks
I have a terminal menu in VSCode that I can open up and directly ssh to stuff, so that seems to cover both sides of the "Tramp" mode usage
You can use FUSE for a somewhat similar effect. It's not editor specific, but mounts remote file systems via SSH, FTP and whatnot directly to your local file system so you can use it with any Editor.
You didn't mention on what operating system you, but here's the link to the version for macOS: https://osxfuse.github.io

How to edit java files in remote machine using eclipse

my project source code is in unix, we are using CM synergy source control for code checkin/chech out files. we update the files using vi editor. Pls help in how to set up eclipse in windows system and then connect to the code server and edit the files.
You could install the Remote System Explorer framework, that allows opening files from a remote server, and also gives shell access to the remote server. For anything more specific, I'm not sure whether a free solution exists.
I experienced some problems accessing remote file systems with the Remote System Explorer Plugin, the FTP session was closed unexpectedly. I recommend for linking in your local projects remote sites Aptana Eclipse Plugin.