Hono
Set up debugger in a Hono project.
Last updated March 19, 2026
Hono
This guide covers adding debugger to a Hono project. The setup takes one line.
| Feature | Support |
|---|---|
| Server console | Yes |
| Server errors | Yes |
| HTTP requests | Yes |
| Browser script injection | Manual |
Install
npm install -D @ephem-sh/debugger
Set up
Add the middleware to your Hono app:
import { Hono } from 'hono'
import { debuggerMiddleware } from '@ephem-sh/debugger/hono'
const app = new Hono()
app.use(debuggerMiddleware({ port: 3000 }))
The middleware handles server instrumentation (console patching,
IPC bridge), browser script serving (/_/d.js), and browser log
ingestion (/_/d).
Browser support
Add script tags before </body> in your HTML responses:
<script>window.__DEBUGGER_INGEST_URL__="/_/d";</script>
<script src="/_/d.js" defer></script>
Verify
bun run --hot src/index.ts
npx dbg statuspnpm dlx dbg statusbun x dbg statusyarn dlx dbg statusnpx dbg browser consolepnpm dlx dbg browser consolebun x dbg browser consoleyarn dlx dbg browser consoleFull example
See the complete working example at examples/node/hono.



