feat: 完成 debug 配置

This commit is contained in:
claude-code-best 2026-04-03 01:11:14 +08:00
parent e48da3956c
commit 1f0a2e44c8
3 changed files with 33 additions and 0 deletions

13
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "bun",
"request": "attach",
"name": "Attach to Bun (TUI debug)",
"url": "ws://localhost:8888/2dc3gzl5xot",
"stopOnEntry": false,
"internalConsoleOptions": "neverOpen"
}
]
}

View File

@ -17,6 +17,7 @@
- [x] 所有 Feature 现在可以通过环境变量配置, 而不是垃圾的 bun --feature
- [x] 移除牢 A 的反蒸馏代码!!!
- [x] 补全 web search 能力(用的 Bing 搜索)!!!
- [x] 支持 Debug
- [ ] V5 大规模重构石山代码, 全面模块分包
- [ ] V5 将会为全新分支, 届时 main 分支将会封存为历史版本
@ -66,6 +67,24 @@ bun run build
如果遇到 bug 请直接提一个 issues, 我们优先解决
## VS Code 调试
TUI (REPL) 模式需要真实终端,无法直接通过 VS Code launch 启动调试。使用 **attach 模式**
### 步骤
1. **终端启动 inspect 服务**
```bash
bun run dev:inspect
```
会输出类似 `ws://localhost:8888/xxxxxxxx` 的地址。
2. **VS Code 附着调试器**
- 在 `src/` 文件中打断点
- F5 → 选择 **"Attach to Bun (TUI debug)"**
> 注意:`dev:inspect``launch.json` 中的 WebSocket 地址会在每次启动时变化,需要同步更新两处。
## 相关文档及网站
<https://deepwiki.com/claude-code-best/claude-code>

View File

@ -37,6 +37,7 @@
"scripts": {
"build": "bun run build.ts",
"dev": "bun run scripts/dev.ts",
"dev:inspect": "bun --inspect-wait=localhost:8888/2dc3gzl5xot run scripts/dev.ts",
"prepublishOnly": "bun run build",
"lint": "biome lint src/",
"lint:fix": "biome lint --fix src/",