Skip to content

Add devcontainer troubleshooting steps to development_environment.mdx #2281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/development_environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ As this approach uses containers, you may face challenges exposing hardware like

In the future, if you want to get back to your development environment: open Visual Studio Code, click on the "Remote Explorer" button in the sidebar, select "Containers" at the top of the sidebar.

**Troubleshooting**

- If your container fails to build due to outdated dependencies or a previously built devcontainer, it might be using a stale fork of your repository. Follow these steps:
- Ensure your GitHub fork is up-to-date with the main Home Assistant core repository.
- Clean local Docker build files by running `docker buildx prune` in the terminal.
- If the build still fails:
- Select "Open configuration in recovery devcontainer."
- Open a terminal (if not already open).
- Run `git pull upstream dev` and ensure it applies the current version.
- Open the command palette in Visual Studio Code - `Shift`+`Command`+`P` (Mac) / `Ctrl`+`Shift`+`P` (Windows/Linux).
- Select "Dev Containers: Rebuild Container."

### Tasks

The devcontainer comes with some useful tasks to help you with development, you can start these tasks by opening the command palette with `Shift`+`Command`+`P`(Mac) / `Ctrl`+`Shift`+`P` (Windows/Linux) and select `Tasks: Run Task` then select the task you want to run.
Expand Down