6.6 KiB
title, intro, product, redirect_from, versions, type, topics, shortTitle
| title | intro | product | redirect_from | versions | type | topics | shortTitle | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Using Codespaces in Visual Studio Code | You can develop in your codespace directly in {% data variables.product.prodname_vscode %} by connecting the {% data variables.product.prodname_github_codespaces %} extension with your account on {% data variables.product.product_name %}. | {% data reusables.gated-features.codespaces %} |
|
|
how_to |
|
Visual Studio Code |
Prerequisites
To develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must sign into the {% data variables.product.prodname_github_codespaces %} extension. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode %} October 2020 Release 1.51 or later.
Use the {% data variables.product.prodname_vs %} Marketplace to install the {% data variables.product.prodname_github_codespaces %} extension. For more information, see Extension Marketplace in the {% data variables.product.prodname_vscode %} documentation.
{% mac %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Click Sign in to view {% data variables.product.prodname_dotcom %}....
3. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click Allow.
4. Sign in to {% data variables.product.product_name %} to approve the extension.
{% endmac %}
{% windows %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Use the "REMOTE EXPLORER" drop-down, then click {% data variables.product.prodname_github_codespaces %}.
3. Click Sign in to view {% data variables.product.prodname_codespaces %}....
4. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click Allow.
5. Sign in to {% data variables.product.product_name %} to approve the extension.
{% endwindows %}
Creating a codespace in {% data variables.product.prodname_vscode %}
After you connect your {% data variables.product.product_name %} account to the {% data variables.product.prodname_github_codespaces %} extension, you can develop in a codespace that you created on {% data variables.product.product_name %} or in {% data variables.product.prodname_vscode %}.
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Click the Add icon, then click Create New Codespace.
3. Type, then click the repository's name you want to develop in.
4. Click the branch you want to develop on.
5. Click the machine type you want to develop in.

Opening a codespace in {% data variables.product.prodname_vscode %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Under "Codespaces", click the codespace you want to develop in.
3. Click the Connect to Codespace icon.
![]()
Changing the machine type in {% data variables.product.prodname_vscode %}
{% data reusables.codespaces.codespaces-machine-types %}
You can change the machine type of your codespace at any time.
- In {% data variables.product.prodname_vscode %}, open the Command Palette (
shift command P/shift control P). - Search for and select "Codespaces: Change Machine Type."

- Click the codespace that you want to change.

- Choose the machine type you want to use.
If the codespace is currently running, a message is displayed asking if you would like to restart and reconnect to your codespace now. Click Yes if you want to change the machine type used for this codespace immediately. If you click No, or if the codespace is not currently running, the change will take effect the next time the codespace restarts.
Deleting a codespace in {% data variables.product.prodname_vscode %}
- Under "Codespaces", right-click the codespace you want to delete.
- In the drop-down menu, click Delete Codespace.

Switching to the Insider's build of {% data variables.product.prodname_vscode %}
You can use the Insider Build of Visual Studio Code within {% data variables.product.prodname_codespaces %}.
-
In bottom left of your {% data variables.product.prodname_codespaces %} window, select {% octicon "gear" aria-label="The settings icon" %} Settings.
-
From the list, select "Switch to Insiders Version".
-
Once selected, {% data variables.product.prodname_codespaces %} will continue to open in Insiders Version.
