Skip to content
Devon Friend edited this page May 6, 2024 · 1 revision

Where can I find my source code on my host machine after developing in the devcontainer?

Your work will be saved in the directory os161_devcontainer/os161. Everything inside the $WORKSPACE_DIR directory in the devcontainer is synced to os161_devcontainer/os161 on your local host.

Where is my OS161 code stored in the devcontainer?

OS161 source code is stored in $WORKSPACE_DIR/os161/src. If you changed directories and do not remember where the source code is, then change directories back to the workspace:

cd $WORKSPACE_DIR

Where is the toolchain?

The OS161 toolchain is stored in $OS161_DEPENDENCIES_DIR.

How can I add my own dotfiles to the devcontainer?

See the documentation on configuration.

Why do I need to open the OS161 code workspace inside the devcontainer?

Opening the code workspace enables VS Code settings that are specific to the workspace and provides access to VS Code tasks and launch configurations that speed up development. It also configures VS Code extensions with specific settings.

As long as you build and open the devcontainer, the code workspace is technically unnecessary for development. However, various tasks that could be handled by VS Code tasks and launch configurations would need to be done manually in the CLI (i.e. building, debugging, etc.). The custom VS Code settings will also not be applied.

Learn more about VS Code Workspaces here.

How can I run VS Code commands and tasks?

ctrl + shift + p opens the command palette. Search your desired VS Code command and execute it. If you want to execute a task, select the Tasks: Run Task VS Code command and select the desired task.

How can I add my own VS Code tasks and launch configurations?

Add your own tasks to the workspace configuration file. See the existing tasks as examples. Learn more about custom tasks here.

How can I add and/or configure VS Code extensions in the devcontainer?

To add a VS Code extension as part of the devcontainer, add the extension identifier to the extensions array in .devcontainer/devcontainer.json and rebuild the devcontainer (ctrl + shift + p > Rebuild Devcontainer).

Extension configuration can be accomplished by adding the configuration fields to the "settings" array in os161.code-workspace. Consult the documentation for the extension you are configuring.