|
| 1 | +--- |
| 2 | +title: Using the Command Palette in Codespaces |
| 3 | +intro: 'You can use the Command Palette feature of {% data variables.product.prodname_vscode %} to access many commands in Codespaces.' |
| 4 | +versions: |
| 5 | + free-pro-team: '*' |
| 6 | +type: reference |
| 7 | +topics: |
| 8 | + - Codespaces |
| 9 | + - Visual Studio Code |
| 10 | +--- |
| 11 | + |
| 12 | +{% data reusables.codespaces.release-stage %} |
| 13 | + |
| 14 | +### About the Command Palette |
| 15 | + |
| 16 | +The Command Palette is one of the focal features of {% data variables.product.prodname_vscode %} and is available for you to use in Codespaces. The Command Palette allows you to access many commands for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode %}. For more information on using the Command Palette, see "[User Interface](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)" in the Visual Studio Code documentation. |
| 17 | + |
| 18 | +### Accessing the Command Palette |
| 19 | + |
| 20 | +You can access the Command Palette in a number of ways. |
| 21 | + |
| 22 | +- `Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows). |
| 23 | + |
| 24 | + Note that this command is a reserved keyboard shortcut in Firefox. |
| 25 | +- `F1` |
| 26 | +- From the Application Menu, click **View > Command Palette…**. |
| 27 | + |
| 28 | +  |
| 29 | + |
| 30 | +### Commands for {% data variables.product.prodname_github_codespaces %} |
| 31 | + |
| 32 | +To see all commands related to {% data variables.product.prodname_github_codespaces %} access the Command Palette, then start typing "Codespaces". |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +#### Suspending or stopping a codespace |
| 37 | + |
| 38 | +If you add a new secret, you'll have to stop and restart the codespace for it to apply your changes. |
| 39 | + |
| 40 | +To suspend or stop your codespace's container, access the Command Palette, then start typing "stop". Select **Codespaces: Stop Current Codespace**. |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +#### Adding a dev container from a template |
| 45 | + |
| 46 | +To add a dev container from a template, access the Command Palette, then start typing "dev container". Select **Codespaces: Add Development Container Configuration Files...** |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +#### Rebuilding a codespace |
| 51 | + |
| 52 | +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. |
| 53 | + |
| 54 | +To rebuild your container, access the Command Palette, then start typing "rebuild". Select **Codespaces: Rebuild Container**. |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +#### Codespaces logs |
| 59 | + |
| 60 | +You can use the Command Palette to access the codespace creation logs, or you can use it export all logs. |
| 61 | + |
| 62 | +To retrieve the logs for Codespaces, access the 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. |
| 63 | + |
| 64 | + |
0 commit comments