Using Codespaces in Visual Studio Code

You can develop in your codespace directly in Visual Studio Code by connecting the Visual Studio Codespaces extension with your account on GitHub.

Codespaces is available for user accounts using GitHub Free or GitHub Pro. For more information, see "GitHub's products."

In this article

Did this doc help you?

Note: Codespaces is currently in limited public beta and subject to change. During the beta period, GitHub does not make any guarantees about the availability of Codespaces. For more information about joining the beta, see "About Codespaces."

Connecting the Visual Studio Codespaces extension to your GitHub account

Before you can develop in a codespace directly in Visual Studio Code, you must configure the Visual Studio Codespaces extension to connect to your GitHub account.

  1. Use the Visual Studio Marketplace to install the Visual Studio Codespaces extension. For more information, see Extension Marketplace in the Visual Studio Code documentation.
  2. In Visual Studio Code, in the left sidebar, click the Extensions icon.
    The Extensions icon in Visual Studio Code
  3. Below Visual Studio Codespaces, click the Manage icon, then click Extension Settings.
    The Extension Settings option
  4. Use the Codespaces: Account Provider drop-down menu, and click GitHub.
    Setting the Account Provider to GitHub
  5. In Visual Studio Code, in the left sidebar, click the Remote Explorer icon.
    The Remote Explorer icon in Visual Studio Code
  6. If Codespaces is not already selected in the header, click Codespaces.
    The Codespaces header
  7. Click Sign in to view Codespaces....
    Signing in to view Codespaces
  8. To authorize Visual Studio Code to access your account on GitHub, click Allow.
  9. Sign in to GitHub to approve the extension.

Opening a codespace in Visual Studio Code

After you've connected your GitHub account to the Visual Studio Codespaces extension, you can develop in a codespace that you created on GitHub directly in Visual Studio Code.

  1. In Visual Studio Code, in the left sidebar, click the Remote Explorer icon.
    The Remote Explorer icon in Visual Studio Code
  2. Under Codespaces, click the codespace you want to develop in.
  3. Click the Connect to Codespace icon.
    The Connect to Codespace icon in Visual Studio Code

Did this doc help you?