launch
Code OSS Dev - Launch + Debug
You're working on VS Code itself and you want to:
- Launch a Code OSS build from sources that is already signed in (Copilot, GitHub, etc.) so chat / agent flows work end-to-end.
- Drive it with
@playwright/cliover CDP (UI automation). - Optionally attach a debugger via dap-cli to set breakpoints in the renderer, extension host, or main process.
- Run multiple instances at once without port conflicts.
This skill provides a launcher that clones an authenticated user-data-dir to a throwaway temp folder, picks free ports for every debug surface, and prints them as JSON so you can pick them up programmatically.
The clone is slim: workspace storage, browser caches, file history, cached VSIX backups, and old logs are excluded by default. On macOS, auth tokens live in the OS keychain plus small files inside User/globalStorage - both of which *are* preserved. On Windows the GitHub session lives in the shared-data-dir instead, which the launcher seeds separately (see Windows authentication).
Prerequisites
- macOS, Linux, or Windows.
- macOS / Linux: the launcher is a bash script (
scripts/launch.sh) and depends onrsync,nohup, and Node onPATH. - Windows: use
scripts\launch.ps1instead. It needs no extra tooling beyond Node onPATH, and works on both Windows PowerShell 5.1 and PowerShell 7+. Parse launcher output withConvertFrom-Json. If Node is managed with fnm, put it onPATHfirst:
```powershell
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression
fnm use # picks up the repo's .nvmrc
```
- A VS Code checkout with
node_modules/installed (pnpm installif missing — do not symlink from a sibling worktree; that breaks builds in subtle ways). - A VS Code checkout with sources built. Run
pnpm run compileonce (one-shot) orpnpm run watchfor incremental rebuilds. Both build the full client and all built-in extensions underextensions/. You must build the full product to run successfully, building just the client is not enough. - The launcher compiles only when outputs are missing; it does not detect stale dependencies or
out/files. After pulling, switching branches, or changing dependency manifests, runpnpm installwhen needed and rebuild before launching. - An authenticated Code OSS profile is recommended but not required. By default the launcher tries to seed from
~/.vscode-oss-devon macOS/Linux or$env:USERPROFILE\.vscode-oss-devon Windows, which is the user-data-dir the repo'slaunch.jsonconfigs use. Only pass--source-user-data-dir <path>(or set$CODE_OSS_DEV_AUTHED_USER_DATA_DIR) when you specifically want to seed from a different profile (e.g. your regular~/Library/Application Support/Codeinstall). If the source profile is missing, the launcher continues with an empty isolated profile. @playwright/cliavailable (it's a devDependency in the vscode repo -pnpm installthen usenpx @playwright/cli).- For debugger work:
dap-clionPATH. If debugger support would be useful but thedap-cliskill is not present, prompt the user to install it from https://github.com/roblourens/dap-cli. - CSS selectors are internal implementation details. If a selector-based
evalstops working, take a freshsnapshot, inspect the current DOM, and update the selector rather than assuming an old one still applies. - Code OSS cannot be launched or driven from a sandboxed agent terminal. On Windows the sandbox either cannot start without local network access or the launcher fails with
[launch.ps1] Access is denied; enabling local network access alone is not enough. If your shell tool can request unsandboxed execution, use that for the launcher,@playwright/cli, and cleanup. Otherwise, before launching, ask the user once to turn off terminal sandboxing for this session (Permissions picker → "Sandboxing for terminal") and continue after they confirm.
The launcher copies the source profile to a temp dir and never mutates the original. Each launch gets its own isolated--user-data-dirand--extensions-dir.
The launcher always setsfiles.simpleDialog.enable: truein the launched profile'sUser/settings.json. This is required for automation: VS Code's native OS file dialogs cannot be driven via@playwright/cliover CDP and are completely unreachable over SSH on headless macOS. The simple (quick-input) dialog can be navigated withpressand clipboard paste. The override is per-launch and only affects throwaway profiles.
Before launching from an agent session, callget_current_sessionand pass itstitleas--session-title. For a regular editor window, the launcher writes that title into the throwaway profile'swindow.titlesetting. For an Agents window, it passes the title to the Command Center. This never modifies the source profile.
For unattended automation, pass --disable-workspace-trust so a trust dialog cannot block the flow or extension-host startup. The override is process-scoped and does not modify the source profile. Only use it with content you trust.Launch
The launcher script lives next to this SKILL.md at scripts/launch.sh (macOS/Linux) or scripts\launch.ps1 (Windows). Resolve it relative to wherever this skill file is installed - do not hardcode an absolute path.
# LAUNCH=<dir-of-this-SKILL.md>/scripts/launch.sh
SESSION_TIT