Suppose you have a Visual Studio Code project on your home computer, and you forget to bring it to your office. Now, how can you get that file? If your home computer is online, you can get it to any device by running Visual Studio Code in a web browser. In this article, we will show you how to run VS Code on any machine, anywhere.
How to run VS Code on any machine anywhere
To run VS Code on any machine anywhere, you have to follow these steps:
- Install the Tunnel extensions on Visual Studio Code
- Create a Tunnel
- Turn on the Remote Tunnel Access
- Connect to the Tunnel
All these steps are explained below in detail.
1] Install Tunnel extensions in Visual Studio Code
Open the VS Code software on your computer and then click the Greater Than-Less Than arrow sign on the bottom left side. Now, select the Tunnel option. It will take a few seconds to install the Tunnel extensions on VS Code.
After successful installation, you can view the installed Tunnel extensions on the Extensions tab. The shortcut key to open the Extensions tab is Ctrl + Shift + X.
2] Create a Tunnel
After installing the Tunnel extensions in VS Code, the next step is to create a tunnel. Click on the Greater Than-Less Than sign on the bottom left side of the software and then select the Connect to Tunnel option.
You will be asked to select an account to create a Tunnel. You can select either your Microsoft account or your GitHub account.
3] Turn on the Remote Tunnel Access
The next step is turning on the Remote Tunnel Access, so you can access the VS Code files from any device. To do so, click on your profile icon on the bottom left side and select the Turn on Remote Tunnel Access option.
Alternatively, you can also enable the Remote Tunnel Access by pressing the F1 key. Press the F1 key and then type “remote tunnels:” After that, select the Turn on Remote Tunnel Access option.
When you turn on the Remote Tunnel Access, VS Code will show you the following two options:
- Turn on for this session
- Enable as a service
If you select the first option, you can access VS Code files remotely only when the software is open on your main computer. If you select the second option, you can access the VS Code files remotely whenever the main computer is turned on and your account is logged in to the main computer.
After turning on the Remote Tunnel Access, you will see a notification on the bottom right side of the software, as shown in the above screenshot. Now, you can access the VS Code files on any machine by signing in with the same Microsoft or GitHub account.
Accessing VS Code on a different machine
Open your web browser on another device, say your Android phone or your office PC. Type vscode.dev in the address bar of the web browser and press Enter.
Click the Greater Than-Less Than arrows on the bottom left side and select the Connect to Tunnel option. Now, sign in with the same Microsoft or GitHub account. After that, click Allow. Select your machine name from the list.
Now, click Open file and type the path where your VS Code file is located. After opening the file, you can edit it on the remote computer. The file will be updated automatically on your main computer.
Signing out of VS Code on the remote computer
To sign out of VS Code on the remote computer, click your profile icon at the bottom left side, select your account name, and click Sign out. Now, click your laptop or PC name at the bottom left side and select the Close Remote Workspace option.
Turning off the Remote Tunnel Access on the main computer
To turn off the Remote Tunnel Access on your main computer, open VS Code and press F1. Now, type “Remote tunnels:” Click Yes to confirm. If you want to sign out of VS Code on your main computer, click your profile icon, select your account, and then select Sign out.
That’s it. I hope this helps.
How do I run Visual Studio Code as a different user?
First, you have to sign out of your current account in Visual Studio Code. For this, click on the profile icon on the bottom left side, select your account, and click Sign out. Now, click the profile icon again and select Backup and sync settings. After that, click Sign in. Now, enter the account details to sign in.
Can I access my VS Code from another computer?
Yes, you can access VS Code from another computer through Remote Tunnel. For this, you need to install the Remote Tunnel extension in VS Code on the main computer. After enabling the Remote Tunnel, you can access VS Code on another computer through any web browser.
Read next: Top free extensions for Visual Studio Code.
Leave a Reply