More exciting than the Visual Studio Code 1.34 release: Remote Development with VS Code

table of contents
Hello,
I'm Mandai, the Wild Team member of the development team.
This is usually an article highlighting interesting features and tidbits from the latest release notes for Visual Studio Code (VSCode), but I'm more interested in Remote Development with VSCode, so I'd like to take a closer look at it this time.
I made a blunder and said that the update was minor , but this was it.
Remote Development has finally been announced,
so I'd like to take a look under the hood to see how it works.
The development environment seems to be changing
At Beyond, we don't use containers and most development is done on VMs, but the development environments around the world are also changing rapidly. I
don't have a detailed summary, but I think my environment is centered around maximizing the efficiency of VSCode as much as possible under the current circumstances.
If there's anything that can accelerate this even further, we have no choice but to use it!
This time, I would like to examine what the "remote" in remote development refers to, as the definition is only vague from the title
preparation
At the time of writing this article, there is an extension for remote development, but it only works with the Insiders Build, so we will quickly install it.
The Insiders Build can be prepared separately from your existing environment, so download and install it from here
Once the installation is complete, install the extension
In my case, I am testing this in a Windows environment, so please read accordingly
The name of the extension is "Remote Development", so search for it as shown in the screenshot below and install it
Once the extension is installed, you will see an additional icon in the sidebar.
Enter the connection information here.
As shown in the screenshot below, locations where SSH settings are commonly located are readily available for selection
Now you have everything you need
Try connecting
This time, I'm going to try connecting to a different server, so I'll enter the path to ssh_config in Settings. I
thought I could enter the SSH information from scratch, but it seems I need ssh_config.
Since there is no ssh_config in the Windows environment, this is a bit of a hassle.
This time, I will connect to a VM in my local environment, so I wrote out the ssh_config using the following command
vagrant ssh > ssh_config
Let's specify the file that was created
Then, the connection destination you just added will be displayed in the sidebar
It seems that you can manage local and remote extensions separately
When I looked at the terminal, I saw a message saying "Please do not delete it as it is tunneled via SSH."
To prevent accidents, it would be nice if this kind of thing was done in the background, but since this is a trial version, let's not worry about the details
Most of the time has been spent taking screenshots, and so far it's going very smoothly
!
Once you get to this stage, opening a terminal will automatically open the remote terminal.
Until now, you had to open a local terminal with Ctrl + Shift + @ and then connect via SSH using something like vagrant ssh, but now it's a little easier to open.
Try opening the project
First, I checked whether SSH is possible, so I'll try to open the development environment, which is its intended purpose.
Since this VM already has a working environment, I won't go into details about setting up the execution environment or transferring a set of files, but I think there should be no problem with using git clone for files.
If you select Open Folder from File, /home/vagrant will be entered.
In other words, once you have an SSH connection, it seems that you can select a folder in the remote environment.
Around this point, I started to understand how amazing it was, and I got goosebumps. I
gradually started to feel like, "This is so convenient!"
Then, after entering the project root path and clicking OK, the window will reload and the implemented files will be displayed in the Explorer as usual.
The Git branch you were working on will still be displayed, and everything will be the same as before.
I was so taken aback that I wondered if it was okay to continue working like this
Where to install the extension
Since the environment is divided into two, local and remote, I wondered where to install extensions, but I couldn't find a solution, so I installed PHP Intellephense
The installation was completed without any dialog box appearing asking which one to install to
It seems that the extension was installed in a remote environment, and the status is Reload Required.
It seems that remote hot reloading is not supported.
I think hot reloading is an essential feature these days, so I think it will be implemented soon
When I opened the code, I saw that the intelephense indexing process was running smoothly, so it was working without any problems
Things that I thought would work completely locally, such as color themes, require the window to be reloaded every time, so it seems there is still room for improvement
Therefore, the conclusion seems to be that you don't need to worry about extensions one by one
Remote operating environment
Finally, I would like to summarize the operating environment on the remote side
First, the remote computer must be running Linux,
and only a 64-bit OS.
I haven't tried it myself, but the VSCode blog has images of Ubuntu running, so it doesn't seem to be tied to any particular distribution.
My VM is running CentOS 7, so I think it's safe to say that these two operating systems are fine for now.
Next, you need to have bash, tar, and (curl || wget) installed on the remote side.
I'm not sure if curl or wget need to be installed, but
these are all commonly used pieces of software, so even if you do need to install them, it won't be too much trouble.
The above two are limitations that exist for both SSH and containers.
In particular, when running in a container, the installation of required software must be written in the dockerfile, so if you use an existing one, please note that you will need to modify it.
There are many other restrictions
- Can't drag and drop to Explorer area
- PuTTY not supported
- Installing an extension requires a reload (this is the same as the previous one)
- If you are using git via SSH and either the SSH tunnel or git uses a non-password SSH key, git operations will be transmitted over HTTPS
At the time of writing, there are 74 issues registered, and although it seems like it will be difficult to fix them, I hope they can be resolved
summary
This time, it was an introductory article on Remote Development with VSCode disguised as a summary article of VSCode releases
- Connection is easy (it's just a hassle to create ssh config)
- It moves more smoothly than I expected
- It seems like it would work well for local VM development too
- It works for now. I'm sure there will be problems if I continue to use it
It seems that you can't manually disconnect the remote connection, so the solution is to close the window when you want to disconnect, which gives it a beta feel and is exciting
There are a lot of issues with it right now, and it may be a tough time, but I have a strong feeling that this will become the standard, so I recommend it. I
encourage everyone to try it out, even if they have complaints.
That's all
0







