Developing in a codespace

You can open a codespace on GitHub, then develop using Visual Studio Code's features.

You can develop in codespaces you've created for repositories owned by organizations using GitHub Team and GitHub Enterprise Cloud.

Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. 更多信息请参阅“GitHub 的产品”。

About development with Codespaces

Codespaces provides you with the full development experience of Visual Studio Code. You can edit code, debug, and use Git commands while developing in a codespace with Visual Studio Code. For more information, see the Visual Studio Code documentation.

Codespace overview with annotations

  1. Side Bar - By default, this area shows your project files in the Explorer.
  2. Activity Bar - This displays the Views and provides you with a way to switch between them. You can reorder the Views by dragging and dropping them.
  3. Editor - This is where you edit your files. You can use the tab for each editor to position it exactly where you need it.
  4. Panels - This is where you can see output and debug information, as well as the default place for the integrated Terminal.
  5. Status Bar - This area provides you with useful information about your codespace and project. For example, the branch name, configured ports, and more.

For more information on using Visual Studio Code, see the User Interface guide in the Visual Studio Code documentation.

You can connect to your codespace directly from Visual Studio Code. For more information, see "Using Codespaces in Visual Studio Code."

For the best experience with Codespaces, we recommend using a Chromium-based browser, like Google Chrome or Microsoft Edge. For more information, see "Troubleshooting Codespaces clients."

Personalizing your codespace

You can also use a dotfiles repository and Settings Sync to personalize aspects of the codespace environment for any codespace that you create. Personalization can include shell preferences and additional tools. For more information, see "Personalizing Codespaces for your account."

After the Codespaces configuration for a repository changes, you can apply the changes to an existing codespace by rebuilding the container for the codespace. For more information, see "Configuring Codespaces for your project."

Running your app from a codespace

You can forward ports in your codespace to test and debug your application. For more information, see "Forwarding ports in your codespace."

Committing your changes

Once you've made changes to your codespace, either new code or configuration changes, you'll want to commit your changes. Committing changes to your repository ensures that anyone else who creates a codespace from this repository has the same configuration. This also means that any customization you do, such as adding Visual Studio Code extensions, will appear for all users.

For information, see "Using source control in your codespace."

Using the Command Palette

The Command Palette allows you to access and manage many features for Codespaces and Visual Studio Code. For more information, see "Using the Command Palette in Codespaces."

  1. You can see every available codespace that you have created at github.com/codespaces.
  2. Click the name of the codespace you want to develop in. Name of codespace

Alternatively, you can see any active codespaces for a repository by navigating to that repository and selecting Code. The drop-down menu will display all active codespaces for a repository.

此文档对您有帮助吗?隐私政策

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或, 了解如何参与。