
I built a small Bun DAP adapter so Zed can debug Bun
Feedback & contributors welcome
Hey everyone — I shipped bun-dap: a Debug Adapter Protocol server for Bun, plus a Zed extension that registers a bun debug adapter and launches it.
Why: Zed speaks DAP; Bun’s debugger is WebKit Inspector over WebSocket. This repo is the glue: launch with bun --inspect-wait, wire up the inspector handshake (Inspector.enable → … → Inspector.initialized), map breakpoints (including TS files where Bun “compacts” type-only lines — source-map fallback), stepping, stacks, variables, evaluate, console output.
Try it:
clone → bun install && bun run build && bun link, then Install dev extension in Zed and drop a .zed/debug.json with "adapter": "bun". README has copy-paste configs for single-file, monorepo backend, and attach to bun --inspect=ws://….
Not trying to replace Bun’s official VS Code stack (bun-debug-adapter-protocol is the real deal for feature depth). This is smaller, editor-agnostic, and documented so others can hack on it or reuse ideas.
Contributions: issues & PRs on the repo are welcome — roadmap there covers exception filters, BUN_INSPECT-style attach, path mapping, etc.
If you’re on Bun: curious whether this matches how you expect the inspector to behave, or what you’d want from a minimal DAP surface.
If you’re on Zed: curious how the debug UX feels vs other adapters.