← 返回列表
全部 Skill›工具 Tools›launch

launch

作者 @microsoft · 语言 en
Launch Code OSS (VS Code from sources) into an isolated throwaway profile with unique debug ports so you can drive it with @playwright/cli AND attach a Node debugger via dap-cli in the same session. Use when working on VS Code itself and you want to interact with the running workbench, automate chat or UI flows, test UI features, take screenshots, set breakpoints in the renderer / extension host / main process, or combine UI driving with debugging.
工具 Tools调试工具通用执行命令访问网络读写文件敏感路径待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
195,715
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Code OSS Dev - Launch + Debug

You're working on VS Code itself and you want to:

  1. Launch a Code OSS build from sources that is already signed in (Copilot, GitHub, etc.) so chat / agent flows work end-to-end.
  2. Drive it with @playwright/cli over CDP (UI automation).
  3. Optionally attach a debugger via dap-cli to set breakpoints in the renderer, extension host, or main process.
  4. 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 on rsync, nohup, and Node on PATH.
  • Windows: use scripts\launch.ps1 instead. It needs no extra tooling beyond Node on PATH, and works on both Windows PowerShell 5.1 and PowerShell 7+. Parse launcher output with ConvertFrom-Json. If Node is managed with fnm, put it on PATH first:

```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 install if missing — do not symlink from a sibling worktree; that breaks builds in subtle ways).
  • A VS Code checkout with sources built. Run pnpm run compile once (one-shot) or pnpm run watch for incremental rebuilds. Both build the full client and all built-in extensions under extensions/. 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, run pnpm install when 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-dev on macOS/Linux or $env:USERPROFILE\.vscode-oss-dev on Windows, which is the user-data-dir the repo's launch.json configs 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/Code install). If the source profile is missing, the launcher continues with an empty isolated profile.
  • @playwright/cli available (it's a devDependency in the vscode repo - pnpm install then use npx @playwright/cli).
  • For debugger work: dap-cli on PATH. If debugger support would be useful but the dap-cli skill 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 eval stops working, take a fresh snapshot, 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-dir and --extensions-dir.
The launcher always sets files.simpleDialog.enable: true in the launched profile's User/settings.json. This is required for automation: VS Code's native OS file dialogs cannot be driven via @playwright/cli over CDP and are completely unreachable over SSH on headless macOS. The simple (quick-input) dialog can be navigated with press and clipboard paste. The override is per-launch and only affects throwaway profiles.
Before launching from an agent session, call get_current_session and pass its title as --session-title. For a regular editor window, the launcher writes that title into the throwaway profile's window.title setting. 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
评论
Mmicrosoft
microsoft
microsoft/vscode
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@microsoft
所属大类工具 Tools / 调试工具
国内可用性通用
最近源活动—
风险提示执行命令、访问网络、读写文件、敏感路径
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。