# DevTools

Rebask adds panels to [Vite DevTools](https://devtools.vite.dev/) for inspecting requests, routes,
RSC payloads, Server Functions, cache behavior, and errors.

## Enable DevTools

Install `@vitejs/devtools` and `@rebask/devtools`, then enable DevTools in `vite.config.ts`:

```ts
export default defineConfig({
  devtools: true,
})
```

The Rebask panels appear when `@rebask/devtools` is installed.

## Panels

- **Routes**: page and [route-handler](./routing/route-handlers.md) patterns, files, layouts, exports,
  and [proxy](./routing/proxy.md) patterns.
- **Requests**: request timeline, status, params, render outcome,
  [cache lookups](./caching/rsc-caching.md), and fetches.
- **RSC payloads**: decoded RSC rows and the Server Components they reference.
- **Server Functions**: [action and form-action](./server-functions.md) calls, status, duration, and
  errors.
- **Cache**: [`"use cache"`](./caching/server-components.md#use-cache) and
  [`durableCache`](./caching/server-components.md#durablecache) functions, calls, durations,
  production lifetimes, and tags. Caching is off in development, so the panel shows what production
  will use.
- **Errors**: server and browser errors and warnings with stack traces.

The initial document exposes the running Rebask package version as `window.__REBASK__.version`.

## Diagnostic headers

Inspect responses in the Network tab or with `curl`:

| Header                   | Meaning                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------- |
| `x-rebask-cache`         | `HIT`, `STALE`, or `MISS`. Absent on platform-cached pages                                              |
| `x-rebask-prerender`     | `1` when serving a prerendered shell with dynamic content                                               |
| `x-rebask-deployment-id` | [Deployment id](./production/skew-protection.md#deployment-id) of the server that produced the response |

See [Internal headers](./advanced.md#internal-headers) for the rest of Rebask's request and response
headers.
