1
0
mirror of synced 2025-12-21 19:06:49 -05:00

Hello git history spelunker!

Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
This commit is contained in:
Vanessa Yuen
2020-09-27 14:10:11 +02:00
parent fa8bb2322f
commit 3df90fc9b8
28386 changed files with 1723440 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
---
title: About billing for Codespaces
intro: 'When {{ site.data.variables.product.prodname_codespaces }} becomes generally available, you will be billed for storage and compute usage.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
{{ site.data.reusables.codespaces.about-billing-for-codespaces }}
Compute costs are incurred only when a codespace is active. When you're using a codespace, the codespace is active. After 30 minutes of inactivity, a codespace becomes suspended automatically.
Compute usage is billed per hour, at a rate that depends on your codespace's instance type. During the beta, {{ site.data.variables.product.prodname_codespaces }} offers a single, Linux instance type. At general availability, we'll support three Linux instance types.
| Instance Type (Linux) | Per-hour rate |
| --------------------------------------- | ------------- |
| Basic (2 cores, 4GB RAM, 32 GB SSD) | $0.085 |
| Standard (4 cores, 8 GB RAM, 32 GB SSD) | $0.169 |
| Premium (8 cores, 16 GB RAM, 32 GB SSD) | $0.339 |
Compute pricing may vary for additional instance types and operating systems supported in the future.
Each codespace also incurs monthly storage costs until you delete the codespace. Storage costs for all instance types are $0.10/GB-month.
We'll share more information about any compute and storage usage included in each plan at general availability.

View File

@@ -0,0 +1,57 @@
---
title: About Codespaces
intro: '{{ site.data.variables.product.prodname_codespaces }} is an online development environment, hosted by {{ site.data.variables.product.prodname_dotcom }} and powered by {{ site.data.variables.product.prodname_vscode }}, that allows you to develop entirely in the cloud.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
redirect_from:
- /github/developing-online-with-github-codespaces/about-github-codespaces
versions:
free-pro-team: '*'
---
{% note %}
**Note:** {{ site.data.variables.product.prodname_codespaces }} is currently in limited public beta and subject to change. During the beta period, {{ site.data.variables.product.prodname_dotcom }} does not make any guarantees about the availability of {{ site.data.variables.product.prodname_codespaces }}. For more information about joining the beta, see "[Joining the beta](/github/developing-online-with-codespaces/about-codespaces#joining-the-beta)."
{% endnote %}
### About {{ site.data.variables.product.prodname_codespaces }}
{{ site.data.variables.product.prodname_codespaces }} is a cloud development environment available in your browser. A codespace includes everything you need to develop for a specific repository, including a text editor with syntax highlighting and autocomplete, a terminal, debugging tools, and Git commands, all within {{ site.data.variables.product.prodname_dotcom }}. You can also install {{ site.data.variables.product.prodname_vscode }} extensions in your codespace to add more functionality.
{{ site.data.variables.product.prodname_codespaces }} makes it easier for developers to onboard to a new company or start contributing to an open-source project. Project maintainers can configure a repository so that, when you create a codespace for the repository, the project's dependencies are included automatically. You can start coding faster by reducing time spent configuring your environment.
{{ site.data.variables.product.prodname_codespaces }} allows you to develop in the cloud instead of locally. Developers can contribute from anywhere, on any machine, including tablets or Chromebooks, and there is no need to maintain local copies of intellectual property.
![An open codespace](/assets/images/help/codespaces/codespace-overview.png)
### Using {{ site.data.variables.product.prodname_codespaces }}
Each developer can create one or more codespace for any public repository, or for any private repository owned by their user account. {{ site.data.reusables.codespaces.unsupported-repos }} {{ site.data.reusables.codespaces.codespaces-are-personal }}
{{ site.data.reusables.codespaces.codespaces-are-per-branch }} {{ site.data.reusables.codespaces.concurrent-codespace-limit }} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
{{ site.data.reusables.codespaces.use-visual-studio-features }}
{{ site.data.reusables.codespaces.connect-to-codespace-from-vscode }}
{{ site.data.reusables.codespaces.about-configuration }} For more information, see "[Configuring {{ site.data.variables.product.prodname_codespaces }} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
{{ site.data.reusables.codespaces.about-personalization }} For more information, see "[Personalizing {{ site.data.variables.product.prodname_codespaces }} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
{{ site.data.reusables.codespaces.you-can-see-all-your-codespaces }}
{{ site.data.reusables.codespaces.beta-functionality-limited }}
### About billing for {{ site.data.variables.product.prodname_codespaces }}
{{ site.data.reusables.codespaces.about-billing-for-codespaces }} For more information, see "[About billing for {{ site.data.variables.product.prodname_codespaces }}](/github/developing-online-with-codespaces/about-billing-for-codespaces)."
### Joining the beta
A limited number of people will be invited to join the beta. To join the waitlist, see [Sign up for Codespaces beta](https://github.com/features/codespaces/signup).
### Contacting us about {{ site.data.variables.product.prodname_codespaces }}
If you encounter problems using {{ site.data.variables.product.prodname_codespaces }}, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
If you still need help or have feedback about {{ site.data.variables.product.prodname_codespaces }}, use the [Community Forum](https://github.community/c/codespaces-beta/45).

View File

@@ -0,0 +1,81 @@
---
title: Configuring Codespaces for your project
intro: You can set up a default configuration for every new codespace for your repository to ensure that contributors have all the tools and settings they need in their online development environment.
product: '{{ site.data.reusables.gated-features.codespaces }}'
permissions: People with write permissions to a repository can create or edit the default codespace configuration.
redirect_from:
- /github/developing-online-with-github-codespaces/configuring-github-codespaces-for-your-project
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
### About default codespace configurations
{{ site.data.reusables.codespaces.about-configuration }}
If you don't define a configuration in your repository, {{ site.data.variables.product.prodname_dotcom }} creates a codespace with a base Linux image. The base Linux image includes tools for Node.js, JavaScript, TypeScript, Python, C++, Java, C#, .NET Core, PHP, and PowerShell. For more information about the base Linux image, see the [`microsoft/vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers/tree/master/containers/codespaces-linux) repository.
{{ site.data.reusables.codespaces.about-personalization }} {{ site.data.reusables.codespaces.codespace-config-order }} For more information, see "[Personalizing {{ site.data.variables.product.prodname_codespaces }} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
You can create a default codespace configuration using a pre-built container configuration for your project type, or you can create a custom configuration specific to your project's needs.
{{ site.data.variables.product.prodname_codespaces }} uses settings contained in a file named `devcontainer.json` in the root of the repository or in a `.devcontainer` folder. You can use `devcontainer.json` to set default settings for the entire codespace environment, including the {{ site.data.variables.product.prodname_vscode }} editor, but you can also set editor-specific settings in a file named `.vscode/settings.json`.
Changes to a repository's codespace configuration apply only to every new codespace and do not affect any existing codespace.
### Using a pre-built container configuration
You can use any pre-built container configuration for {{ site.data.variables.product.prodname_vscode }} that is available in the [`vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers) repository. Pre-built container definitions include a common configuration for a particular project type, and can help you quickly get started with a configuration that already has the appropriate container options, {{ site.data.variables.product.prodname_vscode }} settings, and {{ site.data.variables.product.prodname_vscode }} extensions that should be installed.
1. Clone or download the [`vscode-dev-containers`](https://github.com/microsoft/vscode-dev-containers) repository.
1. In the `vscode-dev-containers` repository, navigate to the [`containers`](https://github.com/microsoft/vscode-dev-containers/tree/master/containers) folder, then choose a container configuration for your project's needs. We'll use the [Node.js & JavaScript](https://aka.ms/vscode-dev-containers/definitions/node) container configuration as an example.
1. From the [`Node.js & JavaScript`](https://aka.ms/vscode-dev-containers/definitions/node) folder, copy the `.devcontainer` folder to the root of your project's repository.
1. Commit and push the new configuration to your project's repository on {{ site.data.variables.product.prodname_dotcom }}.
Each new codespace created from a branch which contains the `.devcontainer` folder will be configured according to the folder's contents. For more information, see "[Creating a codespace](/github/developing-online-with-codespaces/creating-a-codespace)."
### Creating a custom codespace configuration
If none of the pre-built configurations meet your needs, you can create a custom configuration by adding a `devcontainer.json` file to the root of your repository or a `.devcontainer` folder. In the file, you can use supported configuration keys to specify aspects of the codespace's environment, like which {{ site.data.variables.product.prodname_vscode }} extensions will be installed.
{{ site.data.reusables.codespaces.vscode-settings-order }}
You can define default editor settings for {{ site.data.variables.product.prodname_vscode }} in two places.
* Editor settings defined in `.vscode/settings.json` are applied as _Workspace_-scoped settings in the codespace.
* Editor settings defined in the `settings` key in `devcontainer.json` are applied as _Remote [Codespaces]_-scoped settings in the codespace.
### Supported codespace configuration keys
You can use configuration keys supported by {{ site.data.variables.product.prodname_codespaces }} in `devcontainer.json`.
#### General settings
- `name`
- `settings`
- `extensions`
- `forwardPorts`
- `devPort`
- `postCreateCommand`
#### Docker, Dockerfile, or image settings
- `image`
- `dockerFile`
- `context`
- `containerEnv`
- `remoteEnv`
- `containerUser`
- `remoteUser`
- `updateRemoteUserUID`
- `mounts`
- `workspaceMount`
- `workspaceFolder`
- `runArgs`
- `overrideCommand`
- `shutdownAction`
- `dockerComposeFile`
For more information about the available settings for `devcontainer.json`, see [devcontainer.json reference](https://aka.ms/vscode-remote/devcontainer.json) in the {{ site.data.variables.product.prodname_vscode }} documentation.

View File

@@ -0,0 +1,40 @@
---
title: Creating a codespace
intro: You can create a codespace for a branch in a repository to develop online.
product: '{{ site.data.reusables.gated-features.codespaces }}'
permissions: 'Anyone can create a codespace for any public repository, or for any repository owned by their user account.'
redirect_from:
- /github/developing-online-with-github-codespaces/creating-a-codespace
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
### About codespace creation
{{ site.data.reusables.codespaces.codespaces-are-personal }}
{{ site.data.reusables.codespaces.codespaces-are-per-branch }} {{ site.data.reusables.codespaces.concurrent-codespace-limit }} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
{{ site.data.reusables.codespaces.unsupported-repos }}
You cannot create a codespace in an empty repository. If your repository is empty, create a file in the repository before creating a codespace. For more information, see "[Adding a file to a repository](/github/managing-files-in-a-repository/adding-a-file-to-a-repository)" and "[Adding a file to a repository using the command line](/github/managing-files-in-a-repository/adding-a-file-to-a-repository-using-the-command-line)."
The environment of the codespace you create will be based on the repository's configuration. For more information, see "[Configuring {{ site.data.variables.product.prodname_codespaces }} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
{{ site.data.reusables.codespaces.about-personalization }} For more information, see "[Personalizing {{ site.data.variables.product.prodname_codespaces }} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
{{ site.data.reusables.codespaces.use-visual-studio-features }}
{{ site.data.reusables.codespaces.you-can-see-all-your-codespaces }}
### Creating a codespace
{{ site.data.reusables.repositories.navigate-to-repo }}
2. Under the repository name, use the "Branch" drop-down menu, and select the branch you want to create a codespace for.
![Branch drop-down menu](/assets/images/help/codespaces/branch-drop-down.png)
3. Under the repository name, use the {% octicon "download" aria-label="The download icon" %} **Code** drop-down menu, and select **Open with Codespaces**.
![Open with Codespaces button](/assets/images/help/codespaces/open-with-codespaces-button.png)
4. If you already have a codespace for the branch, click {% octicon "plus" aria-label="The plus icon" %} **New codespace**.
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)

View File

@@ -0,0 +1,18 @@
---
title: Deleting a codespace
intro: You can delete a codespace you no longer need.
product: '{{ site.data.reusables.gated-features.codespaces }}'
permissions: Anyone can delete a codespace owned by their user account.
redirect_from:
- /github/developing-online-with-github-codespaces/deleting-a-codespace
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
{{ site.data.reusables.codespaces.concurrent-codespace-limit }}
{{ site.data.reusables.codespaces.navigate-to-codespaces }}
2. To the right of the codespace you want to delete, click **Delete**.
![Delete button](/assets/images/help/codespaces/delete-codespace.png)

View File

@@ -0,0 +1,44 @@
---
title: Developing in a codespace
intro: 'You can open a codespace on {{ site.data.variables.product.product_name }}, then develop using {{ site.data.variables.product.prodname_vscode }}''s features.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
permissions: Anyone can develop in a codespace owned by their user account.
redirect_from:
- /github/developing-online-with-github-codespaces/developing-in-a-codespace
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
{{ site.data.reusables.codespaces.use-visual-studio-features }}
{{ site.data.reusables.codespaces.use-chrome }} For more information, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
### Connecting to a codespace from {{ site.data.variables.product.prodname_vscode }}
{{ site.data.reusables.codespaces.connect-to-codespace-from-vscode }}
### Navigating to your codespace
{{ site.data.reusables.codespaces.navigate-to-codespaces }}
2. Click the name of the codespace you want to develop in.
![Name of codespace](/assets/images/help/codespaces/click-name-codespace.png)
### Forwarding ports
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on port 3000, you can access the application from your browser to test and debug it.
When an application running inside a codespace outputs a port to the console, {{ site.data.variables.product.prodname_codespaces }} detects the localhost URL pattern and automatically forwards those ports. You can click on the URL in the terminal to open it in a browser. For example, if an application outputs `http://127.0.0.1:3000` or `http://localhost:3000` to the console, the log would automatically convert the output to a clickable URL for port 3000.
![Automatic Port Forwarding](/assets/images/help/codespaces/automatic-port-forwarding.png)
Alternatively, you can also use any of the following ways to forward a port.
* You can forward a port on demand by triggering the command palette (`shift command P` / `shift control P`) and typing "Codespaces: Forward Port". You can then enter the number of the port you want to forward.
![Command Palette Port Forwarding](/assets/images/help/codespaces/command-palette-port-forwarding.png)
* You can automatically configure forwarded ports in a `.devcontainer.json` file using the `forwardPorts` property.
* You can add or remove forwarded ports within the Remote Explorer extension. From the Remote Explorer you can copy and paste the URLs for forwarded ports, allowing you to access them through your browser.
![Remote Explorer Port Forwarding](/assets/images/help/codespaces/remote-explorer-port-forwarding.png)

View File

@@ -0,0 +1,25 @@
---
title: 'Developing online with {{ site.data.variables.product.prodname_codespaces }}'
shortTitle: Codespaces
intro: 'You can develop entirely in the cloud using {{ site.data.variables.product.prodname_codespaces }}, an integrated development environment (IDE) on {{ site.data.variables.product.prodname_dotcom }}.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
redirect_from:
- /github/developing-online-with-github-codespaces
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
### Table of Contents
{% link_in_list /about-codespaces %}
{% link_in_list /about-billing-for-codespaces %}
{% link_in_list /configuring-codespaces-for-your-project %}
{% link_in_list /creating-a-codespace %}
{% link_in_list /developing-in-a-codespace %}
{% link_in_list /personalizing-codespaces-for-your-account %}
{% link_in_list /deleting-a-codespace %}
{% link_in_list /troubleshooting-your-codespace %}
{% link_in_list /using-codespaces-in-visual-studio-code %}
{% link_in_list /using-codespaces-in-visual-studio %}

View File

@@ -0,0 +1,46 @@
---
title: Personalizing Codespaces for your account
intro: '{{ site.data.variables.product.prodname_codespaces }} uses your `dotfiles` repository on {{ site.data.variables.product.product_name }} to personalize every new codespace that you create.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
permissions: 'Anyone can create a `dotfiles` repository to personalize {{ site.data.variables.product.prodname_codespaces }} for their user account.'
redirect_from:
- /github/developing-online-with-github-codespaces/personalizing-github-codespaces-for-your-account
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
Dotfiles are files and folders on Unix-like systems starting with `.` that control the configuration of applications and shells on your system. You can store and manage your dotfiles in a repository on {{ site.data.variables.product.prodname_dotcom }}. For advice and tutorials about what to include in your `dotfiles` repository, see [GitHub does dotfiles](https://dotfiles.github.io/).
If your user account on {{ site.data.variables.product.prodname_dotcom }} owns a public repository named `dotfiles`, {{ site.data.variables.product.prodname_dotcom }} automatically uses this repository to personalize your codespace environment. Private `dotfiles` repositories are not currently supported.
Your `dotfiles` repository might include your shell aliases and preferences, any tools you want to install, or any other codespace personalization you want to make.
Codespace personalization using your `dotfiles` repository applies to any codespace you create. Project maintainers can also define a default configuration that applies to every codespace for a repository, created by anyone. {{ site.data.reusables.codespaces.codespace-config-order }} For more information, see "[Configuring {{ site.data.variables.product.prodname_codespaces }} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
When you create a new codespace, {{ site.data.variables.product.prodname_dotcom }} clones your `dotfiles` repository to the codespace environment, and looks for one of the following files to set up the environment.
* _install.sh_
* _install_
* _bootstrap.sh_
* _bootstrap_
* _setup.sh_
* _setup_
If none of these files are found, then any files or folders in `dotfiles` starting with `.` are symlinked to the codespace's `~` or `$HOME` directory.
Any changes to your `dotfiles` repository will apply only to each new codespace, and do not affect any existing codespace.
For more information, see [Personalizing](https://docs.microsoft.com/en-us/visualstudio/online/reference/personalizing) in the {{ site.data.variables.product.prodname_vscode }} documentation.
{% note %}
**Note:** Currently, {{ site.data.variables.product.prodname_codespaces }} does not support personalizing the _User_ settings for the {{ site.data.variables.product.prodname_vscode }} editor with your `dotfiles` repository. You can set default _Workspace_ and _Remote [Codespaces]_ settings for a specific project in the project's repository. For more information, see "[Configuring {{ site.data.variables.product.prodname_codespaces }} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#creating-a-custom-codespace-configuration)."
{% endnote %}
### Further reading
* "[Creating a new repository](/github/creating-cloning-and-archiving-repositories/creating-a-new-repository)"

View File

@@ -0,0 +1,21 @@
---
title: Troubleshooting your codespace
intro: You can troubleshoot problems with a codespace by checking for known issues in the `microsoft/vscode` repository.
product: '{{ site.data.reusables.gated-features.codespaces }}'
redirect_from:
- /github/developing-online-with-github-codespaces/troubleshooting-your-codespace
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
{{ site.data.reusables.codespaces.beta-functionality-limited }}
{{ site.data.reusables.codespaces.unsupported-repos }}
If you encounter issues while using a browser that is not Chromium-based, try switching to a Chromium-based browser, or check for known issues with your browser in the `microsoft/vscode` repository by searching for issues labeled with the name of your browser, such as[`firefox`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+label%3Afirefox) or [`safari`](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Asafari).
If you encounter issues while using a Chromium-based browser, you can check if you're experiencing another known issue with {{ site.data.variables.product.prodname_vscode }} in the [`microsoft/vscode`](https://github.com/microsoft/vscode/issues) repository.
If you still need help, you can contact us. For more information, see "[About {{ site.data.variables.product.prodname_codespaces }}](/github/developing-online-with-codespaces/about-codespaces#contacting-us-about-codespaces)."

View File

@@ -0,0 +1,39 @@
---
title: Using Codespaces in Visual Studio Code
intro: 'You can develop in your codespace directly in {{ site.data.variables.product.prodname_vscode }} by connecting the {{ site.data.variables.product.prodname_vs_codespaces }} extension with your account on {{ site.data.variables.product.product_name }}.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
redirect_from:
- /github/developing-online-with-codespaces/connecting-to-your-codespace-from-visual-studio-code
versions:
free-pro-team: '*'
---
{{ site.data.reusables.codespaces.release-stage }}
### Connecting the {{ site.data.variables.product.prodname_vs_codespaces }} extension to your {{ site.data.variables.product.prodname_dotcom }} account
Before you can develop in a codespace directly in {{ site.data.variables.product.prodname_vscode }}, you must configure the {{ site.data.variables.product.prodname_vs_codespaces }} extension to connect to your {{ site.data.variables.product.product_name }} account.
1. Use the {{ site.data.variables.product.prodname_vs }} Marketplace to install the [{{ site.data.variables.product.prodname_vs_codespaces }}](https://marketplace.visualstudio.com/items?itemName=ms-vsonline.vsonline) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {{ site.data.variables.product.prodname_vscode }} documentation.
2. In {{ site.data.variables.product.prodname_vscode }}, in the left sidebar, click the Extensions icon.
![The Extensions icon in {{ site.data.variables.product.prodname_vscode }}](/assets/images/help/codespaces/click-extensions-icon-vscode.png)
3. Below {{ site.data.variables.product.prodname_vs_codespaces }}, click the Manage icon, then click **Extension Settings**.
![The Extension Settings option](/assets/images/help/codespaces/select-extension-settings.png)
4. Use the Codespaces: Account Provider drop-down menu, and click **{{ site.data.variables.product.prodname_dotcom }}**.
![Setting the Account Provider to {{ site.data.variables.product.prodname_dotcom }}](/assets/images/help/codespaces/select-account-provider-vscode.png)
{{ site.data.reusables.codespaces.click-remote-explorer-icon-vscode }}
6. If {{ site.data.variables.product.prodname_codespaces }} is not already selected in the header, click **{{ site.data.variables.product.prodname_codespaces }}**.
![The {{ site.data.variables.product.prodname_codespaces }} header](/assets/images/help/codespaces/codespaces-header-vscode.png)
7. Click **Sign in to view {{ site.data.variables.product.prodname_codespaces }}...**.
![Signing in to view {{ site.data.variables.product.prodname_codespaces }}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png)
8. To authorize {{ site.data.variables.product.prodname_vscode }} to access your account on {{ site.data.variables.product.product_name }}, click **Allow**.
9. Sign in to {{ site.data.variables.product.product_name }} to approve the extension.
### Opening a codespace in {{ site.data.variables.product.prodname_vscode }}
After you've connected your {{ site.data.variables.product.product_name }} account to the {{ site.data.variables.product.prodname_vs_codespaces }} extension, you can develop in a codespace that you created on {{ site.data.variables.product.product_name }} directly in {{ site.data.variables.product.prodname_vscode }}.
{{ site.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.
![The Connect to Codespace icon in {{ site.data.variables.product.prodname_vscode }}](/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png)

View File

@@ -0,0 +1,60 @@
---
title: Using Codespaces in Visual Studio
intro: 'You can develop in your codespace directly in {{ site.data.variables.product.prodname_vs }} by connecting with your account on {{ site.data.variables.product.product_name }}.'
product: '{{ site.data.reusables.gated-features.codespaces }}'
versions:
free-pro-team: '*'
---
{% note %}
**Note:** {{ site.data.variables.product.prodname_codespaces }} is currently in limited public beta and subject to change. During the beta period, {{ site.data.variables.product.prodname_dotcom }} does not make any guarantees about the availability of {{ site.data.variables.product.prodname_codespaces }}. [Sign up for the limited public beta](https://github.com/features/codespaces/signup-vs). For more information about joining the beta, see "[About {{ site.data.variables.product.prodname_codespaces }}](/github/developing-online-with-codespaces/about-codespaces#joining-the-beta)."
{% endnote %}
### About Codespaces in {{ site.data.variables.product.prodname_vs }}
You can create a codespace in {{ site.data.variables.product.prodname_vs }} to develop applications in a Windows environment. When you use a codespace in {{ site.data.variables.product.prodname_vs }}, you can browse source code, build solutions, and commit changes to your repository.
You must create a codespace in {{ site.data.variables.product.prodname_vs }} to use it with the application. Codespaces created outside of {{ site.data.variables.product.prodname_vs }} can not currently be used with {{ site.data.variables.product.prodname_vs }}.
### Prerequisites
Before you configure a codespace in {{ site.data.variables.product.prodname_vs }}, you must download the latest version of [{{ site.data.variables.product.prodname_vs }} Preview](https://aka.ms/vspreview).
#### Enabling the connection between {{ site.data.variables.product.prodname_vs }} and {{ site.data.variables.product.prodname_github_codespaces }}
Connecting to {{ site.data.variables.product.prodname_github_codespaces }} with the {{ site.data.variables.product.prodname_vs }} Preview is not enabled by default, so you will first need to enable the Preview Features option.
1. In {{ site.data.variables.product.prodname_vs }} Preview, use the Tools drop-down menu, then click **Options**.
2. Under **Environment**, select **Preview Features** and check the **Connect to {{ site.data.variables.product.prodname_github_codespaces }}** preview feature.
![Check the Connect to {{ site.data.variables.product.prodname_github_codespaces }} preview feature](/assets/images/help/codespaces/connect-to-github-codespaces-preview-feature.png)
3. You will need to restart {{ site.data.variables.product.prodname_vs }} for the feature to be available.
### Creating a codespace in {{ site.data.variables.product.prodname_vs }}
1. When you launch {{ site.data.variables.product.prodname_vs }}, the Start Window will show a **Connect to a codespace** button under "Get started".
![Visual Studio Start window with Connect to a codespace](/assets/images/help/codespaces/visual-studio-start-window.png)
2. Click **Connect to a codespace**.
3. Click **Sign in to {{ site.data.variables.product.prodname_dotcom }}** and follow the prompts, or click **Create one!** to create a new {{ site.data.variables.product.prodname_dotcom }} account and sign into the account.
![Visual Studio sign in to {{ site.data.variables.product.prodname_dotcom }}](/assets/images/help/codespaces/visual-studio-sign-in-to-github.png)
4. Under "Codespace details", type the repository's URL you want {{ site.data.variables.product.prodname_github_codespaces }} to clone into your codespace.
5. Optionally, use the Instance type and Suspend after drop-down menus to configure more codespace details.
![Visual Studio codespace details](/assets/images/help/codespaces/visual-studio-codespace-details.png)
6. Click **Create and Connect**. {{ site.data.variables.product.prodname_github_codespaces }} will begin preparing the codespace and open {{ site.data.variables.product.prodname_vs }} after the codespace is ready. The codespace name will appear in the remote indicator in the menu.
![Visual Studio connected to eShopOnWeb repository codespace](/assets/images/help/codespaces/visual-studio-eshoponweb-codespace.png)
### Opening a codespace in {{ site.data.variables.product.prodname_vs }}
1. Use the File drop-down menu, and click **Connect to a Codespace**.
![Visual Studio File Connect to a codespace menu item](/assets/images/help/codespaces/visual-studio-file-connect-to-codespace.png)
2. Under "{{ site.data.variables.product.prodname_github_codespaces }}", click the codespace you want to connect to, then click **Connect**.
![Visual Studio displaying available codespaces and details](/assets/images/help/codespaces/visual-studio-connect-codespace.png)
### Configuring a codespace for {{ site.data.variables.product.prodname_vs }}
The default codespace environment created by {{ site.data.variables.product.prodname_vs }} includes popular frameworks and tools such as .NET Core, Microsoft SQL Server, Python, and the Windows SDK. {{ site.data.variables.product.prodname_github_codespaces }} created with {{ site.data.variables.product.prodname_vs }} can be customized through a subset of `devcontainers.json` properties and a new tool called devinit, included with {{ site.data.variables.product.prodname_vs }}.
#### devinit
The [devinit](https://docs.microsoft.com/visualstudio/devinit/getting-started-with-devinit) command-line tool lets you install additional frameworks and tools into your Windows development codespaces, as well as run PowerShell scripts or modify environment variables. devinit supports a configuration file called [devinit.json](https://docs.microsoft.com/visualstudio/devinit/devinit-json), which can be added to your project for creating customized and repeatable development environments. For more information about Windows codespace configuration and devinit, see [Customize a codespace](https://docs.microsoft.com/visualstudio/ide/codespaces/customize-codespaces) in the {{ site.data.variables.product.prodname_vs }} documentation.