About GitHub Codespaces in Visual Studio Code
You can use your local install of Visual Studio Code to create, manage, work in, and delete codespaces. To use GitHub Codespaces in VS Code, you need to install the Codespaces extension. For more information on setting up GitHub Codespaces in VS Code, see "Prerequisites."
By default, if you create a new codespace on GitHub.com, it will open in the browser. If you would prefer to open any new codespaces in VS Code automatically, you can set your default editor to be VS Code. For more information, see "Setting your default editor for GitHub Codespaces."
If you prefer to work in the browser, but want to continue using your existing VS Code extensions, themes, and shortcuts, you can turn on Settings Sync. For more information, see "Personalizing GitHub Codespaces for your account."
Prerequisites
To develop in a codespace directly in VS Code, you must install and sign into the GitHub Codespaces extension with your GitHub credentials. The GitHub Codespaces extension requires VS Code October 2020 Release 1.51 or later.
Use the Visual Studio Code Marketplace to install the GitHub Codespaces extension. For more information, see Extension Marketplace in the VS Code documentation.
-
En VS Code, en la barra lateral izquierda, haz clic en el icono de Explorador Remoto.

Nota: Si el Explorador remoto no se muestra en la barra de actividad:
- Abra la paleta de comandos. Por ejemplo, presionando el Comando+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- Escriba:
codespaces. - Haz clic en Codespaces: Detalles.
-
Click Sign in to view GitHub....

-
To authorize VS Code to access your account on GitHub, click Allow.
-
Sign in to GitHub to approve the extension.
-
En VS Code, en la barra lateral izquierda, haz clic en el icono de Explorador Remoto.

Nota: Si el Explorador remoto no se muestra en la barra de actividad:
- Abra la paleta de comandos. Por ejemplo, presionando el Comando+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- Escriba:
codespaces. - Haz clic en Codespaces: Detalles.
-
Use the "REMOTE EXPLORER" drop-down, then click GitHub Codespaces.

-
Click Sign in to view Codespaces....

-
To authorize VS Code to access your account on GitHub, click Allow.
-
Sign in to GitHub to approve the extension.
Creating a codespace in VS Code
After you connect your account on GitHub.com to the GitHub Codespaces extension, you can create a new codespace. For more information about the GitHub Codespaces extension, see the VS Code Marketplace marketplace.
Note: Currently, VS Code doesn't allow you to choose a dev container configuration when you create a codespace. If you want to choose a specific dev container configuration, use the GitHub web interface to create your codespace. For more information, click the Web browser tab at the top of this page.
-
En VS Code, en la barra lateral izquierda, haz clic en el icono de Explorador Remoto.

Nota: Si el Explorador remoto no se muestra en la barra de actividad:
- Abra la paleta de comandos. Por ejemplo, presionando el Comando+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- Escriba:
codespaces. - Haz clic en Codespaces: Detalles.
-
Click the Add icon: .

-
Type the name of the repository you want to develop in, then select it.

If codespaces are billable for the repository you choose, a message will be displayed in subsequent prompts telling you who will pay for the codespace.
-
Click the branch you want to develop on.

-
If prompted to choose a dev container configuration file, choose a file from the list.

-
Click the machine type you want to use.

Note: Tu elección de los tipos de máquina disponibles podría estar limitada por una directiva configurada para la organización o por una especificación mínima del tipo de máquina para el repositorio. Para más información, vea "Restricción del acceso a los tipos de máquina" y "Configuración de una especificación mínima para las máquinas de los codespaces".
Opening a codespace in VS Code
-
En VS Code, en la barra lateral izquierda, haz clic en el icono de Explorador Remoto.

Nota: Si el Explorador remoto no se muestra en la barra de actividad:
- Abra la paleta de comandos. Por ejemplo, presionando el Comando+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- Escriba:
codespaces. - Haz clic en Codespaces: Detalles.
-
Under "Codespaces", click the codespace you want to develop in.
-
Click the Connect to Codespace icon.

Changing the machine type in VS Code
Normalmente, puedes ejecutar tu codespace en la máquina remota de tu elección, desde 2 hasta 32 núcleos. Cada una de estas tiene un nivel de recursos y de facturación diferentes. Para obtener información, consulta "Acerca de la facturación de GitHub Codespaces".
De forma predeterminada, al crear un codespace se utiliza el tipo de máquina con los recursos válidos más bajos. You can change the machine type of your codespace at any time.
Note: Tu elección de los tipos de máquina disponibles podría estar limitada por una directiva configurada para la organización o por una especificación mínima del tipo de máquina para el repositorio. Para más información, vea "Restricción del acceso a los tipos de máquina" y "Configuración de una especificación mínima para las máquinas de los codespaces".
-
In VS Code, open the Command Palette with Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux).
-
Search for and select "Codespaces: Change Machine Type."

-
If you're not following these instructions within a codespace, click the codespace that you want to change.

If you are following these instructions in a codespace, the change will apply to the codespace you're working in.
-
Select the machine type you want to use.
-
If you're changing to a machine type with a different storage capacity, a prompt will appear asking if you would like to continue. Read the prompt and click Yes to accept.
If you changed to a virtual machine with a different storage capacity (for example, from 64GB to 32GB), your codespace will be unavailable for a short time while the machine type is changed. If the codespace is currently active, it will automatically be stopped. When the change is complete, you'll be able to restart the codespace running on the new machine type.
If you changed to a virtual machine with the same storage capacity, the change will be applied the next time you restart the codespace. An active codespace will not be stopped automatically. For more information on restarting a codespace, see "Stopping and starting a codespace."
Deleting a codespace in VS Code
Puedes eliminar codespaces desde VS Code cuando no estás trabajando actualmente en un codespace.
-
En VS Code, en la barra lateral izquierda, haz clic en el icono de Explorador Remoto.

Nota: Si el Explorador remoto no se muestra en la barra de actividad:
- Abra la paleta de comandos. Por ejemplo, presionando el Comando+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- Escriba:
codespaces. - Haz clic en Codespaces: Detalles.
-
En "CODESPACES DE GITHUB", haz clic con el botón derecho en el codespace que quieras eliminar.
-
Haz clic en Eliminar codespace.

Switching to the Insiders build of VS Code
You can use the Insiders Build of VS Code within GitHub Codespaces.
-
In bottom left of your GitHub Codespaces window, select Settings.
-
From the list, select "Switch to Insiders Version".

-
Once selected, GitHub Codespaces will continue to open in Insiders Version.

