Elysia

Set up debugger in an Elysia project.

Last updated March 19, 2026

Elysia

This guide covers adding debugger to an Elysia project. The setup takes one line.

Elysia official docs

Feature Support
Server console Yes
Server errors Yes
HTTP requests Yes
Browser script injection Manual

Install

bun add -D @ephem-sh/debugger

Set up

Use the debugger plugin with your Elysia app:

import { Elysia } from 'elysia'
import { debuggerPlugin } from '@ephem-sh/debugger/elysia'

const app = new Elysia()
  .use(debuggerPlugin({ port: 3000 }))
  .get('/', () => 'Hello')
  .listen(3000)

The plugin registers browser routes (/_/d.js, /_/d), captures HTTP request timing, and starts the IPC bridge.

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 --watch 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/elysia.

Search Documentation

Search for pages and content