Remote Visual Studio Code



When using a remote connection, Visual Studio builds C Linux projects on the remote machine. It doesn't matter if it's a physical machine, a VM in the cloud, or WSL. To build the project, Visual Studio copies the source code to your remote Linux computer. Starting in Visual Studio 2013 Update 2, you can use the following msvsmon command-line switch to use remote symbols for managed code: Msvsmon /FallbackLoadRemoteManagedPdbs For more information, please see the remote debugging help (press F1 in the remote debugger window, or click Help Usage). Visual Studio Code, along with the Remote - WSL extension, enables you to use WSL as your full-time development environment directly from VS Code. Enter-PSSession -ContainerId foo and Enter-PSSession -VmId foo start a session via PowerShell Direct. Enter-PSSession -HostName foo starts a session via SSH. For more information, see the documentation for Enter-PSSession. Since we are going from macOS to.

Visual Studio Code Docker Remote

This extension allows you to remotely control Visual Studio Code. Run commands from anywhere you want on your device. The extension allows you to take VSCode automation to the next level.

In the background it uses websockets in order to listen to commands it should execute in your VSCode instance.

Info: This is a sample of how I use the Remote Control extension in combination with the macOS Raycast app.

Extension Settings

The extension has the following settings which you can use to configure it:

  • remoteControl.enable: enable/disable this extension
  • remoteControl.port: set the port number for the websocket to start the server

Usage

When you install this extension, it will automatically open a websocket on port 3710. This port can be changed on in the VSCode settings. When you are going to use multiple VSCode sessions at the same time, it is best to configure it on workspace level.

Once installed, you can execute commands for VSCode remotely by calling the Remote Control its websocket. Here is an example how to open the terminal in VSCode:

The text you need to pass to the websocket listener is as you can see a stringified JSON object. The object currently consists of:

Visual
  • Command: <command-id>

Visual Studio Code Remote Development

How do I get the command ID?

To get the command ID, open the Command Palette and type Show all commands. This will give you a list with all the available commands.

Behind each command, there is a gear button. When you click on it, it brings you to the shortcut configuration. Where you can right-click on the command and copy its ID.

Feedback / issues / ideas

Please submit your feedback/issues/ideas by creating an issue in the project repository: issue list.