Skip to main content

Setting your default editor for GitHub Codespaces

Du kannst deinen Standard-Editor für Codespaces auf der Seite mit deinen persönlichen Einstellungen festlegen.

On the settings page, you can set your editor preference so that when you create a codespace, or open an existing codespace, it is opened in your choice of:

  • Visual Studio Code (desktop application)
  • Visual Studio Code (web client application)
  • JetBrains Gateway - for opening codespaces in a JetBrains IDE
  • JupyterLab - the web interface for Project Jupyter

Wenn du einen neuen Codespace mithilfe einer Vorlage erstellst, wird er immer im Visual Studio Code-Webclient geöffnet. Ein vorhandener Codespace kann später in jedem unterstützten Editor geöffnet werden. Weitere Informationen findest du unter Öffnen eines vorhandenen Codespaces.

If you want to use Visual Studio Code as your default editor for GitHub Codespaces, you need to install Visual Studio Code and the GitHub Codespaces extension for Visual Studio Code. For more information, see the download page for Visual Studio Code and the GitHub Codespaces extension on the Visual Studio Code marketplace.

If you want to work on a codespace in a JetBrains IDE you must install the JetBrains Gateway. For more information, see "Verwenden von GitHub Codespaces in der JetBrains-IDE."

Setting your default editor

  1. Klicke auf einer beliebigen Seite in der oberen rechten Ecke auf dein Profilfoto und anschließend auf Einstellungen.

    Screenshot of a user's account menu on GitHub. The menu item "Settings" is outlined in dark orange.

  2. Klicke im Abschnitt „Code, Planung und Automatisierung“ der Seitenleiste auf Codespaces.

  3. Under "Editor preference", select the option you want.

    Screenshot of the "Editor preference" options, with "Visual Studio Code for Web" selected.

    • Wenn du Visual Studio Code oder JetBrains Gateway auswählst, musst du sicherstellen, dass du die ausgewählte Anwendung auf deinem lokalen Computer installiert hast.

    • If you choose Visual Studio Code, GitHub Codespaces will automatically open in the desktop application when you next create or open a codespace.

      You may need to allow access to both your browser and Visual Studio Code for it to open successfully.

    • If you choose JetBrains Gateway, the Gateway application will automatically open when you next create or open a codespace.

    • If you choose JetBrains Gateway, the Gateway application will automatically open when you next create or open a codespace.

      The first time you open a codespace this way you must give permission to open the application.

      The Gateway application will open and the codespace will then be automatically selected. You can then choose a JetBrains IDE, if you have not previously done so, and click Connect to open the codespace in the JetBrains client. For more information, see "Verwenden von GitHub Codespaces in der JetBrains-IDE."

      To connect to a codespace from the Gateway application, you must have an SSH server running on the codespace. Der Codespace, mit dem du eine Verbindung herstellst, muss einen SSH-Server ausführen. Das Standardcontainerimage enthält einen SSH-Server, der automatisch gestartet wird. Wenn deine Codespaces nicht mithilfe des Standardimages erstellt werden, kannst du einen SSH-Server installieren und starten, indem du dem features-Objekt in deiner devcontainer.json-Datei Folgendes hinzufügst:

      "features": {
          // ...
          "ghcr.io/devcontainers/features/sshd:1": {
              "version": "latest"
          },
          // ...
      }
      
    • If you choose JupyterLab, the JupyterLab application must be installed in the codespaces you open. Das Standardcontainerimage enthält JupyterLab, sodass bei Codespaces, die mithilfe des Standardimages erstellt wurden, JupyterLab immer installiert ist. Weitere Informationen zum Standardimage findest du unter Einführung in Entwicklungscontainer und im devcontainers/images-Repository. Wenn du nicht das Standardimage in deiner Entwicklungscontainerkonfiguration verwendest, kannst du JupyterLab installieren, indem du das Feature ghcr.io/devcontainers/features/python zur Datei devcontainer.json hinzufügst. Du solltest die Option "installJupyterlab": true einfügen. Weitere Informationen findest du in der Infodatei für das Feature python im Repository devcontainers/features.

Further reading