> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/honojs/hono/llms.txt
> Use this file to discover all available pages before exploring further.

# Dev Helper

> Development utilities for inspecting routes

The Dev Helper provides utilities for inspecting routes and middleware during development.

## Import

```typescript theme={null}
import { showRoutes, inspectRoutes, getRouterName } from 'hono/dev'
```

## Functions

### showRoutes()

Print all routes to the console.

```typescript theme={null}
function showRoutes(app: Hono, options?: ShowRoutesOptions): void
```

<ParamField path="app" type="Hono" required>
  The Hono application instance
</ParamField>

<ParamField path="options" type="ShowRoutesOptions">
  Display options
</ParamField>

**Example**

```typescript theme={null}
import { Hono } from 'hono'
import { showRoutes } from 'hono/dev'

const app = new Hono()
app.get('/api/users', (c) => c.json([]))
app.post('/api/users', (c) => c.json({}))

showRoutes(app)
// Output:
// GET   /api/users
// POST  /api/users
```

### inspectRoutes()

Get route information as an array.

```typescript theme={null}
function inspectRoutes(app: Hono): RouteData[]
```

<ParamField path="app" type="Hono" required>
  The Hono application instance
</ParamField>

<ResponseField name="return" type="RouteData[]">
  Array of route information objects
</ResponseField>

**Example**

```typescript theme={null}
import { inspectRoutes } from 'hono/dev'

const routes = inspectRoutes(app)
routes.forEach(route => {
  console.log(`${route.method} ${route.path}`)
  console.log(`  Middleware count: ${route.middleware.length}`)
})
```

### getRouterName()

Get the name of the router being used.

```typescript theme={null}
function getRouterName(app: Hono): string
```

<ParamField path="app" type="Hono" required>
  The Hono application instance
</ParamField>

<ResponseField name="return" type="string">
  The router name (e.g., 'SmartRouter', 'RegExpRouter')
</ResponseField>

## Types

```typescript theme={null}
type ShowRoutesOptions = {
  verbose?: boolean
  colorize?: boolean
}

type RouteData = {
  path: string
  method: string
  name: string
  isMiddleware: boolean
  middleware: string[]
}
```

## Verbose Mode

```typescript theme={null}
import { showRoutes } from 'hono/dev'

showRoutes(app, { verbose: true })
// Output includes middleware information:
// GET   /api/users
//       [logger, cors, auth]
```
