Skip to content
Back to skills

Bun Debug

ASecurity

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.

  • 60 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 3, 2026
developmenttypescriptbashdebugging

Works with

  • vscode

Security analysis

A100/100

Scanned November 25, 2026

npx -y skills add laurigates/claude-plugins --skill bun-debug --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bun Debug?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bun Debug
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/laurigates-bun-debug/badge)](https://www.skillsdirectory.com/skills/laurigates-bun-debug)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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(bun --inspect-brk test *), Read
argument-hint: <script.ts> [--brk] [--wait] [--port=9229]
created: 2026-01-22
modified: 2026-11-14
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
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.