Remote Development Environment with Visual Studio Code and Remote SSH


Workcube uses the technological infrastructures specified in the Workcube Development Environment – Software Languages article and is developed as specified in the content titled Dev, QA, Release, and Live. It carries out continuous R&D activities in order to improve its ability to work together by closely following digital transformation and technology. In this context; As stated in detail in our content titled Workcube and Git on local machines currently used by developers, Git and Bitbucket continue to be developed in the cloud environment in the following structure.


In order to contribute to the development process, accelerate the preparation of the local environment, and minimize the time spent on these processes, research has been carried out and the necessary infrastructure for remote development has been prepared. When the relevant steps are followed as indicated in the infographic below; the remote server will be connected to the remote server via Remote SSH with VS Code. By pulling codes from the remote repo under the user's home directory, it will be possible to easily develop in the application environment that uses the central database. After the necessary definitions and settings for access are completed, a newly joined developer will be able to quickly integrate into the team and start developing the Workcube code connected to the center, without the need for any installation (CF, MSSQL, IIS, etc.) other than the IDE in the local development environment.

Visual Studio Code Remote - SSH plug-in works with the infrastructure shown below, and thanks to the plug-in, development can be done by providing access to physical or virtual remote machines. Developers today may need more storage, processing power, and/or memory than is available in a regular laptop. For this reason, they need special developer virtual machines or physical servers, especially when working with large-scale projects...

Code the Digital Future with Workcube!

Note: While connecting with Visual Studio Code Remote SSH, the remote server operating system will be selected, and access will be provided after the user name and password are entered. After installing the plugin, you may encounter an error similar to the one in Image 1 during the first connection. To solve the error, defining the full path of the .ssh directory where our configuration file in Image 2, which we selected for the SSH connection, is in the field in Image 3 of the SSH connection settings, will solve the problem. In addition, if it warns about git version incompatibility, it may be necessary to update the git version in the local environment. Finally, if there is a problem of not being able to connect to your user directory on the other side while installing the vscode-server plugin for your machine, the Remote-SSH: Kill VS Code Server on Host option that appears in the window that appears when the Ctrl+Shift+P keys are pressed, the error will be resolved and the connection will be re-established.

Image 1: Possible Error Screen in Windows Environment


Image 2: Copying Local Configuration Path for Remote SSH


Image 3: Specifying Local Configuration File Path for Remote SSH (CTRL+Shift+P)


Helpful Resources:

https://code.visualstudio.com/docs/remote/ssh

https://code.visualstudio.com/docs/remote/ssh-tutorial

https://help.ubuntu.com/community/SSH?action=show

https://www.dlford.io/docker-vscode-remote-development-server/

https://code.visualstudio.com/blogs/2019/10/03/remote-ssh-tips-and-tricks

https://www.digitalocean.com/community/tutorials/how-to-use-visual-studio-code-for-remote-development-via-the-remote-ssh-plugin

Feedback

Did you find this content helpful?