Using the Visual Studio Code Command Palette in Codespaces

You can use the Command Palette feature of Visual Studio Code to access many commands in Codespaces.

Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. For more information, see "GitHub's products."

About the Visual Studio Code Command Palette

The Command Palette is one of the focal features of Visual Studio Code and is available for you to use in Codespaces. The VS Code Command Palette allows you to access many commands for Codespaces and Visual Studio Code. For more information on using the VS Code Command Palette, see "User Interface" in the Visual Studio Code documentation.

Accessing the VS Code Command Palette

You can access the VS Code Command Palette in a number of ways.

  • Shift + Command + P (Mac) / Ctrl + Shift + P (Windows).

    Note that this command is a reserved keyboard shortcut in Firefox.

  • F1

  • From the Application Menu, click View > Command Palette….

    The application menu

Commands for GitHub Codespaces

To see all commands related to GitHub Codespaces, access the VS Code Command Palette, then start typing "Codespaces".

A list of all commands that relate to Codespaces

Suspending or stopping a codespace

If you add a new secret or change the machine type, you'll have to stop and restart the codespace for it to apply your changes.

To suspend or stop your codespace's container, access the VS Code Command Palette, then start typing "stop". Select Codespaces: Stop Current Codespace.

Command to stop a codespace

Adding a dev container from a template

To add a dev container from a template, access the VS Code Command Palette, then start typing "dev container". Select Codespaces: Add Development Container Configuration Files...

Command to add a dev container

Rebuilding a codespace

If you add a dev container or edit any of the configuration files (devcontainer.json and Dockerfile), you'll have to rebuild your codespace for it to apply your changes.

To rebuild your container, access the VS Code Command Palette, then start typing "rebuild". Select Codespaces: Rebuild Container.

Command to rebuild a codespace

Codespaces logs

You can use the VS Code Command Palette to access the codespace creation logs, or you can use it export all logs.

To retrieve the logs for Codespaces, access the VS Code Command Palette, then start typing "log". Select Codespaces: Export Logs to export all logs related to Codespaces or select Codespaces: View Creation Logs to view logs related to the setup.

Command to access logs

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.