基于AI的VS Code调试工具
通过任何AI助手使用模型上下文协议(MCP)控制您的调试器。
</div>停止点击调试器。 Debugssy允许您通过连接您的AI助手(如Cursor、GitHub Copilot、Claude Desktop)到VS Code的调试引擎来使用自然语言进行调试。
💬 您:“调试为什么用户登录时会得到null”
🤖 AI:设置断点 → 检查变量 → 追踪执行 →
发现数据库查询中缺少WHERE子句 → 修复!⚡
主要特性:
推荐的AI模型:Claude 4.5 Haiku 或 Grok 4 Fast(快速、智能且成本效益高)
选项 1:VS Code Marketplace(推荐)
# 在VS Code中:按Ctrl+Shift+X,搜索“Debugssy”,点击安装
或者从以下链接安装:
选项 2:手动安装(VSIX)
# 从GitHub Releases下载
wget https://github.com/gmaynez/debugssy/releases/latest/download/debugssy-<版本>.vsix
# 安装
code --install-extension debugssy-<版本>.vsix
选项 3:开发模式
git clone https://github.com/gmaynez/debugssy.git
cd debugssy
npm install
# 在VS Code中按F5启动扩展开发主机
一键设置链接:
| AI 助手 | 设置链接 | 手动配置 |
|---|---|---|
| GitHub Copilot | 在VS Code中安装 | 见下文 |
| Cursor | 在Cursor中安装 | 见下文 |
| Claude Desktop | 仅手动 | 见下文 |
添加到VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"debugssy": {
"url": "http://localhost:3000/mcp"
}
}
}
</details> <details id="cursor-configuration"> <summary><b>Cursor 配置</b></summary>⚠️ 注意:更改
debugssy.automationLevel后重启VS Code以使Copilot看到更新的工具。
添加到~/.cursor/mcp.json:
{
"mcpServers": {
"debugssy": {
"url": "http://localhost:3000/mcp"
}
}
}
</details>
<details id="claude-desktop-configuration">
<summary><b>Claude Desktop 配置</b></summary>
添加到配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"debugssy": {
"url": "http://localhost:3000/mcp"
}
}
}
</details>
F5)"调试为什么用户登录时会得到null"
小贴士:在您的AI聊天中键入/以查看引导式调试工作流(/debug-crash,/trace-variable等)
通过文件 → 首选项 → 设置(搜索“debugssy”)访问:
| 设置 | 默认值 | 描述 |
|---|---|---|
debugssy.mcp.enabled | true | 启用MCP服务器 |
debugssy.mcp.port | 3000 | 服务器端口(如果被占用则更改) |
debugssy.automationLevel | assisted | assisted或full |
debugssy.waitForBreakpointTimeout | 5000 | 超时时间(1秒-5分钟) |
debugssy.allowStepOperations | false | 允许全模式下的步进操作 |
debugssy.maxExpressionLength | 100 | 最大表达式长度(安全性) |
debugssy.expressionValidationLevel | moderate | 表达式验证严格程度 |
{
"debugssy.mcp.enabled": true,
"debugssy.mcp.port": 3000,
[...]