Visual Studio Code で Codespaces を使用する

GitHub のアカウントに GitHub Codespaces 機能拡張を接続することにより、Visual Studio Code で codespace を直接開発できます。

Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. 詳しい情報については「GitHubの製品」を参照してください。

必要な環境

Visual Studio Code の Codespaces で直接開発するには、GitHub Codespaces 機能拡張にサインインする必要があります。 GitHub Codespaces 機能拡張には、Visual Studio Code October 2020 Release 1.51 以降が必要です。

Visual Studio Marketplace を使用して、GitHub Codespaces 機能拡張をインストールします。 詳しい情報については、Visual Studio Code ドキュメントの「Extension Marketplace」を参照してください。

  1. Visual Studio Codeの左サイドバーで、 Remote Explorerのアイコンをクリックしてください。 Visual Studio CodeのRemote Explorerアイコン
  2. [Sign in to view GitHub...] をクリックします。 [Signing in to view Codespaces]
  3. Visual Studio Code からの GitHub のアカウントへのアクセスを承認するには、[Allow] をクリックします。
  4. 機能拡張を承認するには、GitHub にサインインします。
  1. Visual Studio Codeの左サイドバーで、 Remote Explorerのアイコンをクリックしてください。 Visual Studio CodeのRemote Explorerアイコン
  2. [REMOTE EXPLORER] ドロップダウンを使用して、[GitHub Codespaces] をクリックします。 Codespaces ヘッダ
  3. [Sign in to view Codespaces...] をクリックします。 [Signing in to view Codespaces]
  4. Visual Studio Code からの GitHub のアカウントへのアクセスを承認するには、[Allow] をクリックします。
  5. 機能拡張を承認するには、GitHub にサインインします。

Visual Studio Code で Codespaces を作成する

GitHub アカウントを GitHub Codespaces 機能拡張に接続した後、GitHub または Visual Studio Code で作成した Codespaces で開発できます。

  1. Visual Studio Codeの左サイドバーで、 Remote Explorerのアイコンをクリックしてください。 Visual Studio CodeのRemote Explorerアイコン
  2. [Add] アイコンをクリックしてから、[Create New Codespace] をクリックします。 Codespaces の [Create New Codespace] オプション
  3. 入力し、開発するリポジトリの名前をクリックします。 新しい Codespaces を作成するためのリポジトリを検索する
  4. 開発するブランチをクリックします。 新しい Codespaces を作成するためのブランチを検索する
  5. 開発するマシンタイプをクリックします。 新しい Codespaces のインスタンスタイプ

Visual Studio Code で codespace を開く

  1. Visual Studio Codeの左サイドバーで、 Remote Explorerのアイコンをクリックしてください。 Visual Studio CodeのRemote Explorerアイコン
  2. [Codespaces] で、開発するコードスペースをクリックします。
  3. [Connect to Codespace] アイコンをクリックします。 Visual Studio Code の [Connect to Codespace] アイコン

Changing the machine type in Visual Studio Code

You can run your codespace on a choice of remote machine, from 2 cores to 32 cores. これらはそれぞれ、異なるレベルのリソースと支払い層を持っています。 For information, see "About billing for Codespaces."

You can change the machine type of your codespace at any time.

  1. In Visual Studio Code, open the Command Palette (shift command P / shift control P).
  2. Search for and select "Codespaces: Change Machine Type." 新しい Codespaces を作成するためのブランチを検索する
  3. Click the codespace that you want to change. 新しい Codespaces を作成するためのブランチを検索する
  4. Choose the machine type you want to use.

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.

Visual Studio Code で Codespaces を削除する

  1. [Codespaces] で、削除するコードスペースを右クリックします。
  2. ドロップダウンメニューで、[Delete Codespace] をクリックします。 GitHub で Codespaces を削除する

このドキュメントは役立ちましたか?

プライバシーポリシー

これらのドキュメントを素晴らしいものにするのを手伝ってください!

GitHubのすべてのドキュメントはオープンソースです。間違っていたり、はっきりしないところがありましたか?Pull Requestをお送りください。

コントリビューションを行う

OR, コントリビューションの方法を学んでください。

問題がまだ解決していませんか?