About 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 Codespaces in Visual Studio Code, you need to install the Acerca de GitHub Codespaces extension. For more information on setting up Codespaces in Visual Studio 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 Visual Studio Code automatically, you can set your default editor to be Visual Studio Code. For more information, see "Setting your default editor for Codespaces."
If you prefer to work in the browser, but want to continue using your existing Visual Studio Code extensions, themes, and shortcuts, you can turn on Settings Sync. For more information, see "Personalizing Codespaces for your account."
Prerequisites
To develop in a codespace directly in Visual Studio Code, you must install and sign into the Acerca de GitHub Codespaces extension with your GitHub credentials. The Acerca de GitHub Codespaces extension requires Visual Studio Code October 2020 Release 1.51 or later.
Use the Visual Studio Marketplace to install the Acerca de GitHub Codespaces extension. For more information, see Extension Marketplace in the Visual Studio Code documentation.
-
En Visual Studio Code, en la barra lateral izquierda, da clic en el icono de Explorador Remoto.
-
Click Sign in to view GitHub....
-
To authorize Visual Studio Code to access your account on GitHub, click Allow.
-
Sign in to GitHub to approve the extension.
-
En Visual Studio Code, en la barra lateral izquierda, da clic en el icono de Explorador Remoto.
-
Use the "REMOTE EXPLORER" drop-down, then click Acerca de GitHub Codespaces.
-
Click Sign in to view Codespaces....
-
To authorize Visual Studio Code to access your account on GitHub, click Allow.
-
Sign in to GitHub to approve the extension.
Creating a codespace in Visual Studio Code
After you connect your account on GitHub.com to the Acerca de GitHub Codespaces extension, you can create a new codespace.
-
En Visual Studio Code, en la barra lateral izquierda, da clic en el icono de Explorador Remoto.
-
Da clic en el icono de Agregar y luego en Crear codespace nuevo.
-
Teclea y luego da clic en el nombre del repositorio en el que quieras desarrollar.
-
Da clic en la rama en la que quieras desarrollar.
-
Haz clic en el tipo de máquina en la que quieres desarrollar.
Note: Your choice of available machine types may be limited by a policy configured for your organization, or by a minimum machine type specification for your repository. Para obtener más información, consulta las secciones "Restringir el acceso a los tipos de máquina" y "Configurar una especificación mínima para las máquinas de los codespaces".
Opening a codespace in Visual Studio Code
-
En Visual Studio Code, en la barra lateral izquierda, da clic en el icono de Explorador Remoto.
-
Under "Codespaces", click the codespace you want to develop in.
-
Click the Connect to Codespace icon.
Changing the machine type in Visual Studio Code
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 más información, consulta la sección "Acerca de la facturación para los Codespaces".
You can change the machine type of your codespace at any time.
-
In Visual Studio Code, 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.
Note: Your choice of available machine types may be limited by a policy configured for your organization, or by a minimum machine type specification for your repository. Para obtener más información, consulta las secciones "Restringir el acceso a los tipos de máquina" y "Configurar una especificación mínima para las máquinas de los codespaces".
-
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 Visual Studio Code
-
En Visual Studio Code, en la barra lateral izquierda, da clic en el icono de Explorador Remoto.
-
Debajo de "Codespaces", da clic derecho en el codespace que quieras borrar.
-
En el menù desplegable, da clic en Borrar codespace.
Switching to the Insiders build of Visual Studio Code
You can use the Insiders Build of Visual Studio Code within Codespaces.
-
In bottom left of your Codespaces window, select Settings.
-
From the list, select "Switch to Insiders Version".
-
Once selected, Codespaces will continue to open in Insiders Version.