You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/dev-box/how-to-set-up-dev-tunnels.md
+44-16Lines changed: 44 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
title: Connect to Microsoft Dev Box Using VS Code
3
-
description: Learn how to set up and connect to your Microsoft Dev Box using the Open in VS Code feature. Follow step-by-step instructions to enable tunnels for a pool, install the Dev Box extension, and connect remotely for development.
3
+
description: Learn how to set up and connect to your Microsoft Dev Box using the Open in VS Code feature. Enable tunnels for a pool, install the Dev Box extension, and connect remotely for development.
4
4
author: RoseHJM
5
5
contributors:
6
6
ms.topic: how-to
7
-
ms.date: 08/28/2025
7
+
ms.date: 01/27/2026
8
8
ms.author: rosemalcolm
9
9
ms.reviewer: rosemalcolm
10
10
---
@@ -16,17 +16,17 @@ Use Microsoft Dev Box with Visual Studio Code (VS Code) to create secure, cloud-
16
16
## Prerequisites
17
17
18
18
- A dev center configured with at least one project and a dev box pool.
19
-
- If you don't have a dev center, create one following these steps:[Quickstart: Configure Microsoft Dev Box](quickstart-configure-dev-box-service.md)
19
+
- If you don't have a dev center, create one following these steps:[Quickstart: Configure Microsoft Dev Box](quickstart-configure-dev-box-service.md)
20
20
- A dev box.
21
21
- If you don't have a dev box, create one following these steps: [Quickstart: Create and connect to a dev box by using the Microsoft Dev Box developer portal](quickstart-create-dev-box.md)
22
22
23
23
## Enable Dev Tunnels on a Dev Box Pool
24
24
25
-
Dev Box Dev Tunnels is a feature that allows developers to connect to their Dev Box using Visual Studio Code (VS Code) through secure tunnels. This feature is particularly useful for developers who want to work remotely or from different locations without needing a full remote desktop connection.
25
+
Dev Box Dev Tunnels is a feature that developers use to connect to their Dev Box by using Visual Studio Code (VS Code) through secure tunnels. This feature is particularly useful for developers who want to work remotely or from different locations without needing a full remote desktop connection.
26
26
27
27
### Register the Dev Box Tunnels preview feature
28
28
29
-
While Dev Box Tunnels is in preview, you must register the feature in your Azure subscription.
29
+
While Dev Box Tunnels is in preview, register the feature in your Azure subscription.
30
30
31
31
1. Sign in to the [Azure portal](https://portal.azure.com).
32
32
@@ -44,9 +44,9 @@ While Dev Box Tunnels is in preview, you must register the feature in your Azure
44
44
45
45
### Enable dev tunnels for a dev box pool
46
46
47
-
Dev tunnels are enabled on a per-pool basis. To enable tunnels for a dev box pool:
47
+
Enable dev tunnels for each dev box pool. To enable tunnels for a dev box pool:
48
48
49
-
1.Navigate to the project that contains the dev box pool where you want to enable tunnels.
49
+
1.Go to the project that contains the dev box pool where you want to enable tunnels.
50
50
51
51
1. On the left menu, select **Manage** > **Dev box pools**.
52
52
@@ -60,11 +60,11 @@ Dev tunnels are enabled on a per-pool basis. To enable tunnels for a dev box poo
60
60
61
61
## Connect to a dev box by using a dev tunnel
62
62
63
-
Follow these steps to set up a dev tunnel and connect to your dev box using VS Code.
63
+
Follow these steps to set up a dev tunnel and connect to your dev box by using VS Code.
64
64
65
65
1. Install VS Code extension
66
66
67
-
In your **local** VS Code, install the [**Dev Box**](https://marketplace.visualstudio.com/items?itemName=DevCenter.ms-devbox) extension from the VS Code Extension Marketplace. Dev tunnels requires version 2.0.0 or later. Make sure you install the extension locally, not on the Dev Box you want to connect to.
67
+
In your **local** VS Code, install the [**Dev Box**](https://marketplace.visualstudio.com/items?itemName=DevCenter.ms-devbox) extension from the VS Code Extension Marketplace. Dev tunnels require version 2.0.0 or later. Make sure you install the extension locally, not on the Dev Box you want to connect to.
68
68
69
69
:::image type="content" source="media/how-to-set-up-dev-tunnels/dev-tunnels-dev-box-extension.png" alt-text="Screenshot of the Dev Box extension in Visual Studio Code showing the extension details and the install option.":::
70
70
@@ -80,28 +80,56 @@ Follow these steps to set up a dev tunnel and connect to your dev box using VS C
80
80
81
81
1. Explore the remote experience in VS Code
82
82
83
-
A new VS Code window opens. You can open any folder or workspace on the remote Dev Box using **File** > **Open File/Folder/Workspace** just as you would locally.
83
+
A new VS Code window opens. You can open any folder or workspace on the remote Dev Box by using **File** > **Open File/Folder/Workspace** just as you would locally.
84
84
85
-
### Connect to Windows Substem for Linux
85
+
### Connect to Windows Subsystem for Linux
86
86
87
-
If you have a Windows Subsystem for Linux (WSL) environment on the Dev Box, connect to it using **Remote Explorer**.
87
+
If you have a Windows Subsystem for Linux (WSL) environment on the Dev Box, use **Remote Explorer** to connect to it.
88
88
89
-
Select WSL targets from the dropdown to see all the WSL distributions. Open any WSL distribution in the current or a new window.
89
+
Select WSL targets from the dropdown to see all the WSL distributions. Open any WSL distribution in the current window or a new window.
90
90
91
91
:::image type="content" source="media/how-to-set-up-dev-tunnels/dev-box-dev-tunnel-linux.png" alt-text="Screenshot of Visual Studio Code Remote Explorer showing available WSL distributions with the Dev Box WSL target highlighted.":::
92
92
93
93
94
94
For more information on the WSL development experience, see [Remote - WSL](https://code.visualstudio.com/docs/remote/wsl) and [Set up a WSL development environment](/windows/wsl/setup/environment).
95
95
96
+
## Troubleshoot connectivity problems with Copilot
97
+
98
+
If you have connectivity problems with your Dev Box, use **Copilot connectivity assist** to diagnose and resolve them. This feature provides guided troubleshooting through GitHub Copilot and the Dev Box MCP Server to help you identify and fix common connection problems.
99
+
100
+
To use Copilot connectivity assist:
101
+
102
+
1. In VS Code, open the Dev Box extension by selecting the Dev Box icon in the left sidebar.
103
+
104
+
1. In the **Dev Box Resources** panel, find the Dev Box you can't connect to.
105
+
106
+
1. Select the settings icon (gear) next to the Dev Box, or right-click the Dev Box name to open the context menu.
107
+
108
+
1. Select **Copilot connectivity assist**.
109
+
110
+
:::image type="content" source="media/how-to-set-up-dev-tunnels/dev-tunnels-connect-tunnel-copilot.png" alt-text="Screenshot of the Dev Box extension in VS Code showing the context menu with the Copilot connectivity assist option highlighted.":::
111
+
112
+
1. Follow the guided prompts from Copilot to diagnose and resolve your connectivity problem.
113
+
114
+
> [!NOTE]
115
+
> This menu option runs `devbox_think` from the DevBox MCP Server. You must have the [DevBox MCP Server](overview-what-is-dev-box-mcp-server.md) installed and configured in VS Code to use this feature. Follow the prompts provided by Copilot to complete the troubleshooting process.
116
+
117
+
Copilot connectivity assist can help with problems such as:
118
+
119
+
- Tunnel connection failures
120
+
- Authentication problems
121
+
- Network configuration problems
122
+
- Dev Box state problems (stopped, hibernated, or unavailable)
123
+
96
124
## Frequently asked questions
97
125
98
-
- Why do I need to sign-in to the Dev Box before enabling the tunnel?
126
+
- Why do I need to signin to the Dev Box before enabling the tunnel?
99
127
100
-
This step is required to establish a user session for setting up the tunnel. After the initial sign-in, you can just disconnect from the Dev Box. Then you can enable or connect to the tunnel without logging in again, unless the Dev Box is shut down or restarted.
128
+
You need to sign in to create a user session for setting up the tunnel. After the initial authentication, you can disconnect from the Dev Box. You can enable or connect to the tunnel without signing in again, unless the Dev Box shuts down or restarts.
101
129
102
130
- Why can't I connect to the Dev Box even if the tunnel is enabled?
103
131
104
-
Refresh the Dev Box extension explorer view with the button in the top right corner to check the latest status of the tunnel. If the tunnel is enabled, but you still can't connect, try disabling the tunnel, signing in to the Dev Box, and then re-enabling the tunnel.
132
+
Refresh the Dev Box extension explorer view by using the button in the upper right corner to check the latest status of the tunnel. If the tunnel is enabled, but you still can't connect, try disabling the tunnel, signing in to the Dev Box, and then re-enabling the tunnel.
0 commit comments