devsandbox 0.7.0

Manage devcontainer-style sandboxes on docker, podman, or Apple container — many throwaway instances per repo from one TOML config.
---
title: Attach VS Code
description: Open any instance in VS Code with one key.
order: 7
icon: code
tags: [editors, devcontainers]
related: [parallel-agents, port-a-devcontainer, features]
---

## The problem

An agent works in instance `fix-login` and you want to read its diff, step through a test or poke at the running app in your editor. With several instances of one repo open, the windows all look alike, and an editor that attaches as the wrong user hits permission errors on the first save.

`devsandbox vscode` (or `o` in the dashboard) opens a window attached to the instance's container, as the sandbox's `remoteUser`, with the sandbox's extensions, titled after the instance.

## Try it

No config needed, only VS Code with the **Dev Containers** extension and `code` on your `PATH`. With instances `fix-login` and `add-search` running:

```bash
devsandbox vscode fix-login     # a window titled fix-login
devsandbox vscode add-search    # a second one, titled add-search
```

In the dashboard, select an instance and press `o`, or type `:code add-search`.

## How it works

- VS Code attaches to the container devsandbox already made, as [`remoteUser`](/docs/config#implemented-devcontainer-properties) if set.
- Extensions in the sandbox's `customizations.vscode.extensions` are installed on attach.
- The window opens `/workspaces/<instance>.code-workspace`, which is what names it.
- `customizations.vscode.settings` is ignored ([accepted but ignored](/docs/config#accepted-but-ignored-warned-at-run)): keep settings in the repo's `.vscode/settings.json`.
- Apple `container` is experimental: set `dev.containers.experimentalAppleContainerSupport` to `true` in VS Code first.