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.

Hono official docs

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 status
pnpm dlx dbg status
bun x dbg status
yarn dlx dbg status
npx dbg browser console
pnpm dlx dbg browser console
bun x dbg browser console
yarn dlx dbg browser console

Full example

See the complete working example at examples/node/hono.

Search Documentation

Search for pages and content