Skip to content

Commit c69ac38

Browse files
authored
add instructions for using devcontainer from WSL
1 parent 23209d9 commit c69ac38

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/development_environment.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,24 @@ If the Dev Container was set up correctly - it supports debugging by default, ou
5959

6060
It is also possible to debug a remote Home Assistance instance (e.g., production instance) by following the procedure described [here](https://www.home-assistant.io/integrations/debugpy/).
6161

62+
### Use devcontainer from WSL
63+
64+
With WSL, you won't run into as many path issues because of the '/' and '\' differences between Linux and Windows.
65+
This is handy when working on frontend code and using `script/develop`, since it's using stuff that works best on Linux.
66+
67+
**Prerequisites**
68+
69+
- [Docker](https://docs.docker.com/get-docker/)
70+
- [Visual Studio code](https://code.visualstudio.com/)
71+
- WSL + A WSL Distribution of your choice (Note: The instructions will be based on Ubuntu). Refer to the "Developing on Windows" section below for further instructions and tips.
72+
73+
1. Enable integration with your WSL distro, This can be done in Docker Desktop under Settings > Resources > WSL integration.
74+
2. Step 1. of "Getting started".
75+
3. Open the terminal of your WSL distro, and clone your fork with `git clone <url from your fork>`.
76+
4. Use the command `code core/` to open Visual Studio Code. In the bottom left corner you will see `WSL: <name of the distribution you are using>`.
77+
5. In Visual Studio Code press the f1 key and select `Dev Containers: Reopen in Container`. Visual Studio Code will reopen and in the bottom left corner you will see `Dev Container: Home Assistant Dev`.
78+
6. Step 6. of "Getting started".
79+
6280
## Manual Environment
6381

6482
_You only need these instructions if you do not want to use devcontainers._

0 commit comments

Comments
 (0)