Python Programmers Prompt VS Code Remote Development Tools
The well-documented bond between Visual Studio Code and Python has been further epitomized in new remote development tooling just announced for Microsoft's popular, open source, cross-platform code editor.
The new remote development tools are useful to developers in general, but the Python camp was instrumental in driving the initiative.
VS Code has long embraced Python, which itself is widely popular, always topping or nearly topping the constant stream of programming language popularity indices. VS Code has gained Python mindshare and the team long ago went all in on Python, to the point of the code editor being bundled with the Anaconda Python distribution.
Yesterday (May 2), in announcing the new remote development functionality provided by the Visual Studio Code Remote Development Extension Pack, the VS Code dev team offered up a lack of Python functionality -- specifically related to the use of containers and virtual machines -- as an example of problems the extension pack addresses.
The three preview extensions included in the pack include:
- Remote - SSH: Work with source code in any location by opening folders on a remote machine/VM using SSH.
- Remote - Containers: Work with a sandboxed toolchain or container based application by opening any folder inside (or mounted into) a container.
- Remote - WSL: Get a Linux-powered development experience from the comfort of Windows by opening any folder in the Windows Subsystem for Linux.
"Python developers want to switch to VS Code but can't, because they need to use containers and virtual machines as development environments configured for a specific Python stack," the team said in announcing the new tooling.
It also addressed the addition of Windows Subsystem for Linux (WSL) support in the context of Python development, stating: "If you have Python 2.7 and Flask installed on Windows (or none at all!) and Python 3.7 and Django installed in the Linux distro, you wouldn't get proper completions or linting because VS Code was looking at the Windows versions of everything."
Another post published yesterday, devoted specifically to Python, shed more light on how instrumental feedback from the Python community was in driving the new remote work capabilities.
"The ability to work with WSL and remote Python interpreters have long been the top requested features on our Python Extension GitHub page," Microsoft's Dan Taylor said in the post titled Remote Python Development in Visual Studio Code. "We have heard from our Python users many different reasons why they need to work in remote workspaces: in the case of SSH their code needs access to large amounts of data, compute, GPUs, or other resources; with Docker they need to be able to create and switch between development environments with complex dependencies; and with WSL they may need tools and packages that are only available in a Linux environment."
Taylor's post provides guidance on working with remote Docker workspaces and dev containers, remote SSH workspaces, remote WSL workspaces and more.
"With remote development, we've enabled all of these scenarios with remote Python interpreters and more: Visual Studio Code's UI runs on your local machine and connects to a remote server which hosts your extensions remotely," Taylor said. "This enables features like auto-completions, debugging, the terminal, source control, extensions you install, almost everything in Visual Studio Code runs seamlessly on the remote machine as if it was your local development workspace."
For yet more guidance, Taylor pointed to:
In general, Microsoft listed benefits of the new remote development extension pack as:
- Being able to edit, build, or debug on a different OS than you are running locally.
- Being able to develop in an environment that matches the target deployment environment.
- Using larger or more specialized hardware than your local machine for development.
- The ability to edit code stored in another location, such as in the cloud or at a customer site.
- Sandboxing of developer environments to avoid conflicts, improve security, and speed up on-boarding.
The new extension pack only works with the Insiders program (frequent builds for early adopters allowing side-by-side installations) of VS Code for now, but will graduate to the stable builds.
David Ramel is an editor and writer for Converge360.