# PhoenixDevToolbar v0.0.2 - API Reference

## Modules

- Setup
  - [PhoenixDevToolbar](PhoenixDevToolbar.md): A dev-only debug toolbar for Phoenix LiveView applications.
  - [PhoenixDevToolbar.Plug](PhoenixDevToolbar.Plug.md): The whole toolbar integration: tracks page requests, injects the toolbar
into HTML responses, and serves the toolbar's own assets and panel.

- Built-in plugins
  - [PhoenixDevToolbar.Plugins.Cluster](PhoenixDevToolbar.Plugins.Cluster.md): > #### Experimental {: .warning}
>
> This API may change in any 0.0.x release. Changes are listed in the CHANGELOG.
  - [PhoenixDevToolbar.Plugins.Ecto](PhoenixDevToolbar.Plugins.Ecto.md): The Ecto tab ([ADR 08](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/08-query-diagnostics.md)): every query of the page,
oldest first, with SQL, params, timings, rows and the code that ran it, N+1
groups flagged above them, EXPLAIN for SELECTs and a JSON export. Part of
`:defaults`.
  - [PhoenixDevToolbar.Plugins.Eval](PhoenixDevToolbar.Plugins.Eval.md): > #### Experimental {: .warning}
>
> This API may change in any 0.0.x release. Changes are listed in the CHANGELOG.
  - [PhoenixDevToolbar.Plugins.LiveView](PhoenixDevToolbar.Plugins.LiveView.md): The LiveView tab ([ADR 07](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/07-live-view-panel.md)): a profiler of every
callback and render of the page's LiveViews and LiveComponents, the assigns and
how they change, an event log (server and browser) and the component tree. Part
of `:defaults`. It takes no options.
  - [PhoenixDevToolbar.Plugins.Process](PhoenixDevToolbar.Plugins.Process.md): The Process tab ([ADR 09](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/09-process-panel.md)): the page's LiveView process
(or a nested one): memory, reductions, message queue, links, monitors and the
tasks it started, read only while the tab is shown. Part of `:defaults`.
  - [PhoenixDevToolbar.Plugins.Request](PhoenixDevToolbar.Plugins.Request.md): The Request tab ([ADR 02](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/02-telemetry-collection-and-correlation.md)):
the page's routed requests, their exceptions with the error banner and
stacktrace, and the response (status, duration). Part of `:defaults`. It takes
no options.
  - [PhoenixDevToolbar.Plugins.System](PhoenixDevToolbar.Plugins.System.md): The System tab ([ADR 11](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/11-system-tab.md)): any local process, by pid or
registered name or through a link from another tab, with the same vital signs
as the Process tab plus ancestors, stacktrace and state. Reads nothing until
someone inspects a process. Part of `:defaults`.

- Reading data
  - [PhoenixDevToolbar.Report](PhoenixDevToolbar.Report.md): Reads what the toolbar captured, without a browser: from IEx, a remote shell,
or an agent that evaluates code in the running app (such as Tidewave's
`project_eval`). See [ADR 13](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/13-report-read-api.md).

- Plugin API
  - [PhoenixDevToolbar.Context](PhoenixDevToolbar.Context.md): What a plugin's `c:PhoenixDevToolbar.Plugin.collect/3` knows about the event
it is handling ([ADR 05](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/05-plugin-behaviour.md)).
  - [PhoenixDevToolbar.Event](PhoenixDevToolbar.Event.md): One recorded fact: a query, a callback, a request ([ADR 05](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/05-plugin-behaviour.md)).
  - [PhoenixDevToolbar.Panel](PhoenixDevToolbar.Panel.md): > #### Experimental {: .warning}
>
> This API may change in any 0.0.x release. Changes are listed in the CHANGELOG.
  - [PhoenixDevToolbar.Plugin](PhoenixDevToolbar.Plugin.md): > #### Experimental {: .warning}
>
> This API may change in any 0.0.x release. Changes are listed in the CHANGELOG.
  - [PhoenixDevToolbar.Truncate](PhoenixDevToolbar.Truncate.md): Bounds payloads before they are stored ([ADR 03](https://github.com/zoten/phoenix_dev_toolbar/blob/main/adr/03-event-storage.md)): plugins use these helpers
in `c:PhoenixDevToolbar.Plugin.collect/3`, which runs inside host processes.
Every function is pure, cheap on small inputs and bounded on large ones.
`redact/2` hides the values of sensitive keys (`config :phoenix_dev_toolbar,
redact: [...]`, by default keys containing "password", "token" or "secret").

