Exercise - Enable Remote - Tunnels in the Visual Studio Code UI

Completed

In this exercise, you enable Remote - Tunnels access by using the Visual Studio Code UI.

Install the Remote – Tunnels extension

  1. Start Visual Studio Code and open the TestUI folder.

    Screenshot of the Visual Studio Code TestUI folder.

  2. Go to Extensions: Marketplace in Visual Studio Code and install the Remote – Tunnels extension:

    1. Select the Extensions icon on the Activity Bar on the side of the window.
    2. Search for Remote - Tunnels.
    3. Select Install.

    Screenshot of Remote - Tunnels search in Extensions: Marketplace.

  3. Restart Visual Studio Code if you're prompted to do so.

  4. Select the Visual Studio Code account image and select Turn on Remote Tunnel Access.

    Screenshot of Turn on Remote Tunnel Access.

  5. Select Turn on for this session.

    Screenshot of the prompt Turn on for this session.

  6. You're prompted to sign in.

    Screenshot of the prompt to sign in.

  7. After you sign in, a tunnel starts on your current machine, which allows remote connection to this machine.

  8. Select Copy Browser Link to Clipboard in the pop-up for the tunnel link and save it.

    You can email the link to yourself or save it in a secure online document for later use.

    Screenshot of tunnel link.

  9. Go to another computer (client) of your choice and retrieve the link. From a browser, paste the tunnel link from the previous step.

    A client is any device that can run a web browser and has internet access, such as a phone, a tablet, or another computer.

  10. Confirm the account that you used to start the tunnel and begin coding!

    Screenshot of prompt asking to select account used to start tunnel.

    Screenshot of the client view.

When you go to vscode.dev, you access a lightweight version of Visual Studio Code running fully in the browser. This version is known as Visual Studio Code for the Web (or vscode.dev). This step allows you to open a folder on your local machine and start coding without any installation.

Note

The remote machine is only reachable through a tunnel while Visual Studio Code is running there. After you exit Visual Studio Code, tunneling to it won't be possible until you start Visual Studio Code there again or run the code tunnel CLI command.