mcpField
B
bun-debug

bun-debug

github.com/laurigatesDevelopment5954 installsUpdated 1d ago
Repository

About bun-debug

bun-debug is a skill for interactively debugging Bun scripts and tests. It launches Bun with inspector options and explains how to connect a debugger.

Key features

  1. 01Launch Bun Inspector
  2. 02Pause at the first line
  3. 03Wait for debugger attachment
  4. 04Debug Bun tests
  5. 05Choose an inspector port

Use cases

  1. 01Step through a Bun script
  2. 02Inspect a fast-exiting script
  3. 03Debug a Bun test matching a pattern

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/laurigates/claude-plugins --skill bun-debug

After installing, type/bun-debugin Claude Code to confirm it loaded.

Details

From the project README

/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 --inspectDiagnosing 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 testUse bun-test when you just want to run tests, not step through them
Waiting for a debugger to attach before executionUse 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):

bun --inspect $FILE

Break at first line:

bun --inspect-brk $FILE

Wait for debugger attachment:

bun --inspect-wait $FILE

Custom port:

bun --inspect=$PORT $FILE

Debug tests:

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:

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

Comments

Markdown supported