Loading...
Loading...
Debug Node.js/TypeScript/JavaScript applications using the agent-dbg CLI debugger. 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, (6) debugging test failures by attaching to a running process, (7) 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".
npx skill4agent add theodo-group/agent-dbg agent-dbgagent-dbg@refs# 1. Launch with breakpoint at first line
agent-dbg launch --brk node app.js
# 2. Set breakpoints at suspicious locations
agent-dbg break src/handler.ts:42
agent-dbg break src/utils.ts:15 --condition "count > 10"
# 3. Run to breakpoint
agent-dbg continue
# 4. Inspect state (shows location, source, locals, stack)
agent-dbg state
# 5. Drill into values
agent-dbg props @v1 # expand object
agent-dbg props @v1 --depth 3 # expand nested 3 levels
agent-dbg eval "items.filter(x => x.active)"
# 6. Fix and verify
agent-dbg set count 0 # change variable
agent-dbg hotpatch src/utils.js # live-edit (reads file from disk)
agent-dbg continue # verify fixagent-dbg launch --brk node app.js
agent-dbg break src/api.ts:50 # suspect line
agent-dbg break src/api.ts:60 --condition "!user" # conditional
agent-dbg continue
agent-dbg vars # check locals
agent-dbg eval "JSON.stringify(req.body)" # inspect deeply
agent-dbg step over # advance one line
agent-dbg state # see new state# Start node with inspector
node --inspect app.js
# Or attach by PID
agent-dbg attach 12345
agent-dbg stateagent-dbg logpoint src/auth.ts:20 "login attempt: ${username}"
agent-dbg logpoint src/auth.ts:45 "auth result: ${result}"
agent-dbg continue
agent-dbg console # see logged outputagent-dbg catch uncaught # pause on uncaught exceptions
agent-dbg continue # runs until exception
agent-dbg state # see where it threw
agent-dbg eval "err.message" # inspect the error
agent-dbg stack # full call stack.ts.ts.ts--generated.js@v1..@vNagent-dbg props @v1agent-dbg set @v2 true@f0..@fNagent-dbg eval --frame @f1 "this"BP#1..Nagent-dbg break-rm BP#1agent-dbg break-toggle BP#1LP#1..Nagent-dbg break-rm LP#1@v@fBP#LP#--json--session NAME--generatedagent-dbg stateagent-dbg state -c-v-sagent-dbg evalawaitagent-dbg blackbox "node_modules/**"agent-dbg hotpatch filecontinuesteppauserun-toagent-dbg stop