1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/content/github/developing-online-with-codespaces/developing-in-a-codespace.md
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

2.7 KiB

title, intro, product, permissions, redirect_from, versions
title intro product permissions redirect_from versions
Developing in a codespace You can open a codespace on {{ site.data.variables.product.product_name }}, then develop using {{ site.data.variables.product.prodname_vscode }}'s features. {{ site.data.reusables.gated-features.codespaces }} Anyone can develop in a codespace owned by their user account.
/github/developing-online-with-github-codespaces/developing-in-a-codespace
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."

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

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

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

  • 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