Modules
A dev-only debug toolbar for Phoenix LiveView applications.
What a plugin's PhoenixDevToolbar.Plugin.collect/3 knows about the event
it is handling (ADR 05).
One recorded fact: a query, a callback, a request (ADR 05).
The whole toolbar integration: tracks page requests, injects the toolbar into HTML responses, and serves the toolbar's own assets and panel.
The Ecto tab (ADR 08): 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.
The LiveView tab (ADR 07): 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.
The Process tab (ADR 09): 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.
The Request tab (ADR 02):
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.
The System tab (ADR 11): 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.
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.
Bounds payloads before they are stored (ADR 03): plugins use these helpers
in 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").