
VSCode 扩展和 CLI 工具,用于基于 MCP 的调试,支持 DAP 协议
概览
——让你的AI助手设置断点,逐步处理代码,实时检查变量。 传统的AI编码助手可以写代码,但它们做不到。MCP调试工具通过简单的CLI命令让AI代理直接访问VS Code的调试器,消除了这一限制。 除了标准的MCP代理外,你还可以通过——无需持久连接来执行调试操作。 - : 基于壳层的 AI 代理直接与调试器交互 - : 无需配置或维护 MCP 服务器连接 - : 结果是纯 JSON(标准配置),日志分离为 stderr — AI 即时解析 - : 将 VS Code 调试无缝集成自动 bash 脚本 该扩展激活后会自动进入你的工作区,这样AI代理就能发现并使用调试工具。 直接从 VS Code 扩展的安装路径运行 CLI —— 。 所有技能现在都完整记录在自动注入的技能文件中,按类别分类,附有参数和使用示例。 目前处于测试阶段。
概述(AI 翻译)
AI代理与VS Code调试器的桥梁 — 让你的AI助手设置断点、逐步解析代码并实时检查变量。
为什么选择MCP调试工具?
传统的AI编码助手可以读写代码,但不能调试**。MCP调试工具通过简单的CLI命令让AI代理直接访问VS Code的调试器,消除了这一限制。
| 无MCP调试工具 | 使用 MCP 调试工具 |
|---|---|
| AI通过代码读取猜测bug | AI设置断点并检查实时运行状态 |
| “试着在这里添加console.log” | AI自动逐行解析代码 |
| 错误消息的手动复制粘贴 | AI 将调用栈和变量值读取为 JSON |
💡 直接CLI控制——无需MCP连接即可工作
除了标准的MCP代理外,你还可以通过一次性终端命令执行调试操作——不需要持久连接。
- 终端AI友好:基于壳层的AI代理直接与调试器交互
- 零连接开销:无需配置或维护MCP服务器连接
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Debug Tools
The bridge between AI Agents and VS Code Debugger — Let your AI assistant set breakpoints, step through code, and inspect variables in real-time.
Why MCP Debug Tools?
Traditional AI coding assistants can read and write code, but they can’t debug it. MCP Debug Tools removes this limitation by giving AI agents direct access to VS Code’s debugger through simple CLI commands.
| Without MCP Debug Tools | With MCP Debug Tools |
|---|---|
| AI guesses at bugs from code reading | AI sets breakpoints and inspects live runtime state |
| “Try adding a console.log here” | AI steps through code line-by-line automatically |
| Manual copy-paste of error messages | AI reads call stacks and variable values as JSON |
💡 Direct CLI Control — Works Without MCP Connection
Beyond the standard MCP proxy, you can execute debugging actions via one-off terminal commands — no persistent connection required.
- Terminal AI Friendly: Shell-based AI agents interact with the debugger directly
- Zero Connection Overhead: No need to configure or maintain an MCP server connection
- Easy Parsing: Results in pure JSON (
stdout), logs separated tostderr— AI parses instantly - Scriptable: Integrate VS Code debugging into automated bash scripts seamlessly
# Discover all available tools
npx @uhd_kr/mcp-debug-tools list
# Execute tools directly
npx @uhd_kr/mcp-debug-tools call add-breakpoint '{"file": "src/app.ts", "line": 15}'
npx @uhd_kr/mcp-debug-tools call step-over
🚀 What’s New in v1.0.0
🤖 AI Agent Skill Auto-Injection
The extension now automatically injects skill documents into your workspace when activated, so AI agents can discover and use debugging tools without any manual configuration.
| AI Platform | Auto-detected Path | Status |
|---|---|---|
| Gemini (Google) | .gemini/skills/dap-cli-debugging/SKILL.md |
✅ Supported |
| Claude Code (Anthropic) | .claude/skills/dap-cli-debugging/SKILL.md |
✅ Supported |
🔌 Offline CLI Support
Run the CLI directly from the VS Code extension’s install path — no internet or npx required.
# macOS / Linux
node ~/.vscode/extensions/uhd.mcp-debug-tools-*/out/cli.js call get-active-session
# Windows (PowerShell)
node "$env:USERPROFILE\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" call get-active-session
📖 Comprehensive Tool Documentation
All 29 debugging tools are now fully documented in the auto-injected skill file, organized by category with parameters and usage examples.
⚠️ Beta Testing
安装
npx -y @uhd_kr/mcp-debug-tools@latest配置
{
"mcpServers": {
"dap-proxy": {
"command": "npx",
"args": ["-y", "@uhd_kr/mcp-debug-tools@latest"],
"env": {}
}
}
}