Skip to content
Skills Library
Programming · Testing

bun-debug

/bun-debug

Bun debugger via --inspect. Use when the user wants to debug a TS/JS file interactively, break at first line, wait for attach, or debug tests with --inspect-brk.

Licence
MIT
Last repository change
24.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Bun debugger via --inspect. Use when the user wants to debug a TS/JS file interactively, break at first line, wait for attach, or debug tests with --inspect-brk.

Arguments

/bun-debug <script.ts> [--brk] [--wait] [--port=9229]
Original author description

Bun debugger via --inspect. Use when the user wants to debug a TS/JS file interactively, break at first line, wait for attach, or debug tests with --inspect-brk.

How it works

  1. When to Use This Skill
  2. Parameters
  3. Execution
  4. Output
  5. Post-launch
  6. VSCode Integration
Original SKILL.md headings · 80 lines, 278 words
SKILL.md preview
---
description: "Bun debugger via --inspect. Use when the user wants to debug a TS/JS file interactively, break at first line, wait for attach, or debug tests with --inspect-brk."
args: <file> [--brk] [--wait] [--port=<port>]
allowed-tools: Bash, Read
argument-hint: <script.ts> [--brk] [--wait] [--port=9229]
created: 2026-01-22
modified: 2026-10-10
reviewed: 2026-04-25
name: bun-debug
model: haiku
effort: low
---

# /bun:debug

Launch a script with Bun's debugger enabled for interactive debugging.

## When to Use This Skill

| Use this skill when... | Use typescript-debugging instead when... |
|---|---|
| Attaching an interactive debugger to a Bun script via `--inspect` | Diagnosing TypeScript compile errors or type mismatches |
| Breaking at the first line of a fast-exiting script (`--inspect-brk`) | Setting up VSCode launch configurations for non-Bun runtimes |
| Debugging Bun tests with `bun --inspect-brk test` | Use bun-test when you just want to run tests, not step through them |
| Waiting for a debugger to attach before execution | Use bun-build when reproducing a build-time error |

## Parameters

- `file` (required): Script file to debug
- `--brk`: Break at first line (for fast-exiting scripts)
- `--wait`: Wait for debugger to attach before running
- `--port=<port>`: Use specific port (default: auto-assigned)

## Execution

**Standard debug (opens debug URL):**
```bash
bun --inspect $FILE
```

**Break at first line:**
```bash
bun --inspect-brk $FILE
```

**Wait for debugger attachment:**
```bash
bun --inspect-wait $FILE
```

**Custom port:**
```bash
bun --inspect=$PORT $FILE
```

**Debug tests:**
```bash
bun --inspect-brk test $PATTERN
```

## Output

The command outputs a debug URL:
```
------------------- Bun Inspector -------------------
Listening: ws://localhost:6499/
Open: debug.bun.sh/#localhost:6499
-----------------------------------------------------
```

## Post-launch

1. Report the debug URL to user
2. Explain how to connect:
   - Open `debug.bun.sh/#localhost:<port>` in browser
   - Or use VSCode with Bun extension attached to the WebSocket URL
3. Remind about breakpoint controls (F8 continue, F10 step over, F11 step into)

## VSCode Integration

For VSCode debugging, suggest adding to `.vscode/launch.json`:

```json
{
  "type": "bun",
  "request": "launch",
  "name": "Debug",
  "program": "${file}",
  "stopOnEntry": true
}
```

Versions

The database has no other skills named bun-debug.

Database snapshot: 13.11.2026 · package version ab13239ec72f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 96testing-bun
    Use when writing or modifying tests in a Bun project
  • 100bun-file-io
    Use for Bun file I/O: Bun.file, Bun.write, streams, directories, glob patterns, metadata.
  • 100bun-nextjs
    This skill should be used when the user asks about "Next.js with Bun", "Bun and Next", "running Next.js on Bun", "Next.js development with Bun", "create-next-app with Bun", or building Next.js applications using Bun as the runtime.
  • 85bun
    Bun runtime patterns. Use when running bun commands, working with package.json/bun.lock, writing TypeScript scripts under Bun, or developing Claude Code plugins.
  • 100bun-build
    Bun build: bundle or compile JS/TS to production bundle or standalone binary. Use when the user wants to bundle, compile, or build for browser/bun/node target.
  • 90bun
    Bun runtime and modern JavaScript backend practices, including Bun-native tooling (bun run/test/build) and PostgreSQL usage guidance. Use when building or reviewing Bun-based services, APIs, scripts, or when Bun-specific workflow questions arise.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.