Loading...
Loading...
Debug applications using the dbg CLI debugger. Supports Node.js (V8/CDP), Bun (WebKit/JSC), and native code via LLDB (DAP). Use when: (1) investigating runtime bugs by stepping through code, (2) inspecting variable values at specific execution points, (3) setting breakpoints and conditional breakpoints, (4) evaluating expressions in a paused context, (5) hot-patching code without restarting (JS/TS), (6) debugging test failures by attaching to a running process, (7) debugging C/C++/Rust/Swift with LLDB, (8) any task where understanding runtime behavior requires a debugger. Triggers: "debug this", "set a breakpoint", "step through", "inspect variables", "why is this value wrong", "trace execution", "attach debugger", "runtime error", "segfault", "core dump".
npx skill4agent add theodo-group/debug-that dbgdbg@refs| Runtime | Language | Launch example |
|---|---|---|
| Node.js | JavaScript | |
| tsx / ts-node | TypeScript | |
| Bun | JavaScript / TypeScript | |
| LLDB | C / C++ / Rust / Swift | |
--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 fixdbg 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 statedbg 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 statedbg logpoint src/auth.ts:20 "login attempt: ${username}"
dbg logpoint src/auth.ts:45 "auth result: ${result}"
dbg continue
dbg console # see logged outputdbg 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.ts.ts.ts--generated.js@v1..@vNdbg props @v1dbg set @v2 true@f0..@fNdbg eval --frame @f1 "this"BP#1..Ndbg break-rm BP#1dbg break-toggle BP#1LP#1..Ndbg break-rm LP#1@v@fBP#LP#--json--session NAME--runtime NAMElldb--generateddbg statedbg state -c-v-sdbg evalawaitdbg blackbox "node_modules/**"dbg hotpatch filedbg break-fn funcNamecontinuesteppauserun-todbg stop