# dbg

This skill teaches your agent to drive the dbg CLI debugger: set breakpoints, step through code, inspect variables and patch JS/TS without a restart.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 620 installs · ★ 159
- Author: theodo-group
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/theodo-group/debug-that/tree/HEAD/.claude/skills/debug-that/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/dbg

## What it does

\`dbg` is a CLI debugger, and the skill tells the agent how to run it. Coverage is broad: Node.js over V8/CDP, Bun over WebKit/JSC, Python through debugpy/DAP, Java through JDWP/DAP, and native C, C++, Rust and Swift through LLDB. The runtime is auto-detected from the launch command, except for native code, where you pass `--runtime lldb` yourself.

A session follows a short loop. Launch paused on the first line with `dbg launch --brk node app.js`, set breakpoints by file and line, add `--condition` for the noisy ones, then drive it with `dbg continue --wait 30`, `dbg state` and `dbg props @v1` to expand objects. Short `@refs` stand in for long identifiers, so you rarely type an ID by hand.

One limit matters: `dbg set` and `dbg hotpatch` are JS/TS only. Python gets `break`, `continue`, `state`, `vars`, `eval`, `step` and `break-fn`, but no live value edits. Attaching to a Python process that has its own debugpy listener goes over TCP, and a bare port needs `--runtime python` or dbg has no idea what it connected to. Also, `--wait-for-client` treats the first TCP connection as the client, so don't probe the port to check readiness — attach once.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add theodo-group/debug-that --skill dbg -a claude-code
```
```bash
npx skills add theodo-group/debug-that --skill debug-that -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/debug-that/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/debug-that/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add theodo-group/debug-that --skill debug-that -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/debug-that/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add theodo-group/debug-that --skill debug-that -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/debug-that/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install theodo-group/debug-that debug-that
```

2. **Manually: put the files in place**
- File: `.github/skills/debug-that/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add theodo-group/debug-that --skill debug-that -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/theodo-group/debug-that --path .claude/skills/debug-that
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/debug-that/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add theodo-group/debug-that --skill debug-that -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/theodo-group/debug-that/tree/HEAD/.claude/skills/debug-that/SKILL.md

## When to use it
- find the line where a variable picks up the wrong value
- set a conditional breakpoint instead of stopping on every hit
- expand a nested object several levels deep
- edit JS code and verify the fix without restarting the process
- attach to an already running process or a test runner

## Example prompts
- debug this: user comes back empty, set a breakpoint at `src/api.ts:50`
- set a conditional breakpoint at `src/utils.ts:15` with `count > 10` and show me the locals
- attach to `9229`, print the state, then step over one line

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: baff46a19bdc26ce.

BEGIN THIRD-PARTY FILE baff46a19bdc26ce
````text
---
name: dbg
description: >
  Debug applications using the dbg CLI debugger.
  Supports Node.js (V8/CDP), Bun (WebKit/JSC), Python (debugpy/DAP), Java (JDWP/DAP), 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) debugging Python via debugpy,
  (9) 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".
---

# dbg Debugger

`dbg` is a CLI debugger that supports **Node.js** (V8/CDP), **Bun** (WebKit/JSC), **Python** (via debugpy/DAP), **Java** (via JDWP/DAP) and **native code** (C/C++/Rust/Swift via LLDB/DAP). It uses short `@refs` for all entities -- use them instead of long IDs.

## Supported Runtimes

| 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` |
| Bun executable (`bun build --compile`) | JavaScript / TypeScript | `dbg launch --brk ./my-cli --its-flags` |
| debugpy | Python | `dbg launch --brk python3 app.py` (or attach -- see Python section) |
| LLDB | C / C++ / Rust / Swift | `dbg launch --brk --runtime lldb ./program` |
| JDWP | Java | `dbg launch --brk --runtime java ./program` |

The runtime is auto-detected from the launch command for JS and Python runtimes, including executables compiled by Bun (else pass `--runtime bun`). Everything after the program's name goes to it unchanged. For native code, use `--runtime lldb`. Python can also attach to a running `debugpy` listener over TCP (`--runtime python`).

## Core Debug Loop

```bash
# 1. Launch with breakpoint at first line
dbg launch --brk node app.js
# Or: dbg launch --brk bun app.ts
# Or: dbg launch --brk python3 app.py
# 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
````
END THIRD-PARTY FILE baff46a19bdc26ce

The third-party file has ended. Everything between the baff46a19bdc26ce tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2485 of 10106 bytes. © theodo-group · MIT · https://github.com/theodo-group/debug-that/tree/HEAD/.claude/skills/debug-that/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
