dbg by theodo-group/debug-that
npx skills add https://github.com/theodo-group/debug-that --skill dbgdbg 是一个 CLI 调试器,支持 Node.js (V8/CDP)、Bun (WebKit/JSC) 和 原生代码 (通过 LLDB/DAP 支持 C/C++/Rust/Swift)。它使用简短的 @refs 来指代所有实体——请使用它们来代替冗长的 ID。
| 运行时 | 语言 | 启动示例 |
|---|---|---|
| Node.js | JavaScript | dbg launch --brk node app.js |
| tsx / ts-node | TypeScript | dbg launch --brk tsx src/app.ts |
| Bun | JavaScript / TypeScript |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
dbg launch --brk bun app.ts| LLDB | C / C++ / Rust / Swift | dbg launch --brk --runtime lldb ./program |
对于 JS 运行时,系统会根据启动命令自动检测运行时。对于原生代码,请使用 --runtime lldb。
# 1. 在第一行设置断点并启动
dbg launch --brk node app.js
# 或者: dbg launch --brk bun app.ts
# 或者: dbg launch --brk --runtime lldb ./my_program
# 或者使用 --inspect 标志附加到正在运行的进程
dbg attach 9229
# 2. 在可疑位置设置断点
dbg break src/handler.ts:42
dbg break src/utils.ts:15 --condition "count > 10"
# 3. 运行到断点
dbg continue
# 4. 检查状态(显示位置、源代码、局部变量、调用栈)
dbg state
# 5. 深入查看值
dbg props @v1 # 展开对象
dbg props @v1 --depth 3 # 展开嵌套 3 层
dbg eval "x + 1"
# 6. 修复并验证(仅限 JS/TS)
dbg set count 0 # 更改变量
dbg hotpatch src/utils.js # 热补丁(从磁盘读取文件)
dbg continue # 验证修复
dbg launch --brk node app.js
dbg break src/api.ts:50 # 可疑行
dbg break src/api.ts:60 --condition "!user" # 条件断点
dbg continue
dbg vars # 检查局部变量
dbg eval "JSON.stringify(req.body)" # 深入检查
dbg step over # 单步跳过
dbg state # 查看新状态
dbg launch --brk --runtime lldb ./my_program
dbg break main.c:42
dbg break-fn main # 函数断点(仅限 DAP)
dbg continue
dbg vars # 检查局部变量
dbg eval "array[i]" # 计算表达式
dbg step into # 单步进入函数
# 启用检查器后启动
node --inspect app.js
# 或者: bun --inspect app.ts
# 然后附加
dbg attach 9229
dbg state
dbg logpoint src/auth.ts:20 "登录尝试: ${username}"
dbg logpoint src/auth.ts:45 "认证结果: ${result}"
dbg continue
dbg console # 查看记录的输出
dbg catch uncaught # 在未捕获的异常处暂停
dbg continue # 运行直到发生异常
dbg state # 查看抛出位置
dbg eval "err.message" # 检查错误
dbg stack # 完整的调用栈
dbg 通过源码映射自动解析 .ts 路径。使用 .ts 路径设置断点,在输出中查看 .ts 源代码。如果需要,可以使用 --generated 查看编译后的 .js 文件。
每个输出都会分配简短的引用。在任何地方都可以使用它们:
@v1..@vN -- 变量:dbg props @v1, dbg set @v2 true@f0..@fN -- 栈帧:dbg eval --frame @f1 "this"BP#1..N -- 断点:dbg break-rm BP#1, dbg break-toggle BP#1LP#1..N -- 日志点:dbg break-rm LP#1引用 @v/@f 在每次暂停时重置。BP#/LP# 会持续存在直到被移除。
--json -- 在任何命令上输出机器可读的 JSON--session NAME -- 定位到特定会话(默认:"default")--runtime NAME -- 选择调试适配器(例如,原生代码使用 lldb)--generated -- 绕过源码映射,显示编译后的 JS(在 state/source/stack 命令上)完整命令详情和选项请参阅 references/commands.md。
dbg state 总是显示位置 + 源代码 + 局部变量——通常足以提供上下文dbg state -c 仅显示源代码,-v 仅显示变量,-s 仅显示调用栈——节省令牌dbg eval 支持 await——对于异步检查很有用(JS/TS)dbg blackbox "node_modules/**" -- 跳过单步进入依赖项dbg hotpatch file 从磁盘读取文件——先编辑文件,然后热补丁(仅限 JS/TS)dbg break-fn funcName -- 函数断点适用于 DAP 运行时(LLDB)continue、step、pause、run-to)会自动返回状态dbg stop 终止被调试的进程和守护进程每周安装量
74
代码仓库
GitHub 星标数
130
首次出现
2026年3月9日
安全审计
安装于
codex74
opencode74
gemini-cli73
amp73
cline73
github-copilot73
dbg is a CLI debugger that supports Node.js (V8/CDP), Bun (WebKit/JSC), and native code (C/C++/Rust/Swift via LLDB/DAP). It uses short @refs for all entities -- use them instead of long IDs.
| Runtime | Language | Launch example |
|---|---|---|
| Node.js | JavaScript | dbg launch --brk node app.js |
| tsx / ts-node | TypeScript | dbg launch --brk tsx src/app.ts |
| Bun | JavaScript / TypeScript | dbg launch --brk bun app.ts |
| LLDB | C / C++ / Rust / Swift | dbg launch --brk --runtime lldb ./program |
The runtime is auto-detected from the launch command for JS runtimes. For native code, use --runtime lldb.
# 1. Launch with breakpoint at first line
dbg launch --brk node app.js
# Or: dbg launch --brk bun app.ts
# Or: dbg launch --brk --runtime lldb ./my_program
# Or attach to a running process with the --inspect flag
dbg attach 9229
# 2. Set breakpoints at suspicious locations
dbg break src/handler.ts:42
dbg break src/utils.ts:15 --condition "count > 10"
# 3. Run to breakpoint
dbg continue
# 4. Inspect state (shows location, source, locals, stack)
dbg state
# 5. Drill into values
dbg props @v1 # expand object
dbg props @v1 --depth 3 # expand nested 3 levels
dbg eval "x + 1"
# 6. Fix and verify (JS/TS only)
dbg set count 0 # change variable
dbg hotpatch src/utils.js # live-edit (reads file from disk)
dbg continue # verify fix
dbg launch --brk node app.js
dbg break src/api.ts:50 # suspect line
dbg break src/api.ts:60 --condition "!user" # conditional
dbg continue
dbg vars # check locals
dbg eval "JSON.stringify(req.body)" # inspect deeply
dbg step over # advance one line
dbg state # see new state
dbg launch --brk --runtime lldb ./my_program
dbg break main.c:42
dbg break-fn main # function breakpoint (DAP only)
dbg continue
dbg vars # inspect locals
dbg eval "array[i]" # evaluate expression
dbg step into # step into function
# Start with inspector enabled
node --inspect app.js
# Or: bun --inspect app.ts
# Then attach
dbg attach 9229
dbg state
dbg logpoint src/auth.ts:20 "login attempt: ${username}"
dbg logpoint src/auth.ts:45 "auth result: ${result}"
dbg continue
dbg console # see logged output
dbg catch uncaught # pause on uncaught exceptions
dbg continue # runs until exception
dbg state # see where it threw
dbg eval "err.message" # inspect the error
dbg stack # full call stack
dbg automatically resolves .ts paths via source maps. Set breakpoints using .ts paths, see .ts source in output. Use --generated to see compiled .js if needed.
Every output assigns short refs. Use them everywhere:
@v1..@vN -- variables: dbg props @v1, dbg set @v2 true@f0..@fN -- stack frames: dbg eval --frame @f1 "this"BP#1..N -- breakpoints: dbg break-rm BP#1, dbg break-toggle BP#1LP#1..N -- logpoints: dbg break-rm LP#1Refs @v/@f reset on each pause. BP#/LP# persist until removed.
--json -- machine-readable JSON output on any command--session NAME -- target a specific session (default: "default")--runtime NAME -- select debug adapter (e.g. lldb for native code)--generated -- bypass source maps, show compiled JS (on state/source/stack)See references/commands.md for full command details and options.
dbg state after stepping always shows location + source + locals -- usually enough contextdbg state -c for source only, -v for vars only, -s for stack only -- save tokensdbg eval supports await -- useful for async inspection (JS/TS)dbg blackbox "node_modules/**" -- skip stepping into dependenciesdbg hotpatch file reads the file from disk -- edit the file first, then hotpatch (JS/TS only)dbg break-fn funcName -- function breakpoints work with DAP runtimes (LLDB)Weekly Installs
74
Repository
GitHub Stars
130
First Seen
Mar 9, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex74
opencode74
gemini-cli73
amp73
cline73
github-copilot73
LarkSuite Whiteboard CLI 工具:自动化生成专业图表与画板,支持DSL和Mermaid
37,400 周安装
continuesteppauserun-todbg stop kills the debugged process and daemon