# Stacks Debugbar The request inspector drawn at the foot of every page in development: queries, timeline, logs, exceptions, events, cache, mail and jobs for each request, plus a "Sign in as" tab. The Stacks counterpart of Laravel Debugbar. It runs when the app environment is `local` or `development` and `APP_DEBUG` is not false. It cannot run in production: there the package registers nothing, whatever its configuration says. ## Usage A Stacks app needs no setup. Both servers wire the debugbar in, and the bar appears on every page. ```ts import { debugbar } from '@stacksjs/debugbar' debugbar.info('cart recalculated', { items: cart.items.length }) const rates = await debugbar.measure('shipping rates', () => carrier.rates(cart)) ``` Every call is a no-op outside a collected request. Add a section of your own: ```ts import { registerCollector } from '@stacksjs/debugbar' registerCollector({ name: 'tenant', label: 'Tenant', collect: () => ({ id: currentTenant()?.id }), }) ``` Configure it in `config/debugbar.ts`. See the [debugbar docs](https://stacksjs.com/docs/packages/debugbar). ## Testing ```bash bun test ``` ## License MIT. See [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md).