Skip to content

VS Code

VS Code can attach to a workbench two ways: the Dev Containers extension (talks to Docker directly - the most native path) or the SSH attach point. Pick one; both land you in the same container.

Prerequisites: Docker is running and the workbench is applied and up (monoceros apply acme, check with monoceros status acme).

Section titled “Option A: Dev Containers extension (recommended)”

The native VS Code path - no SSH, and it works on Windows/WSL out of the box.

  1. Install the Dev Containers extension (Microsoft) from the Marketplace.

  2. Open the Command Palette and run Dev Containers: Open Workspace in Container….

  3. Pick the workspace file acme.code-workspace in ~/.monoceros/container/acme/.

VS Code opens the generated multi-root workspace inside the container, with a clear root label and a tidied explorer that shows your repos, not the scaffold.

Uses the SSH host monoceros apply set up for you - the same flow as the other editors.

  1. Install the Remote - SSH extension (Microsoft).

  2. Click Open a Remote Window (the >< button at the bottom-left of the window).

  3. Choose Connect to Host… and pick monoceros-acme.

  4. In the new window, run File -> Open Workspace from File… and select /workspaces/acme/acme.code-workspace.

The host monoceros-acme and its key are written by monoceros apply - nothing to set up by hand.

Both options work. The Dev Containers extension handles the Windows-to-WSL-to-container chain itself. For the SSH option, monoceros apply (running in WSL) also writes the Windows ~/.ssh/config entry and key, so monoceros open acme code and Remote-SSH: Connect to Host… resolve monoceros-acme from Windows with nothing to set up. You need Docker Desktop (provides docker.exe) and the Windows OpenSSH client (bundled since Windows 10).

Installed extensions and user settings live in named Docker volumes, so they survive a monoceros apply rebuild - you don’t reinstall after every change. monoceros remove acme deletes them along with the container.

  • Context-aware extension suggestions. Monoceros recommends extensions that fit the workbench - a DB client when a database service is present, GitHub or GitLab tooling per repo host. Suggestions, never forced.
  • No nagging rebuild prompts. apply only rewrites the config files VS Code watches when something actually changed, so you don’t get the recurring “configuration changed, rebuild?” prompt on every apply.

See the IDE FAQ.