Run tests and generate a comprehensive debug report with all snapshots.
All arguments are passed through to mix test, so you can use any
test filtering options.
This command automatically enables telemetry capture by setting
EXCESSIBILITY_TELEMETRY_CAPTURE=true, which captures:
- Mount events
- handle_event calls (clicks, submits)
- handle_params calls (navigation)
- All render cycles (form updates, state changes)
Render event capture dramatically increases timeline visibility (often 10-20x more events), enabling powerful analyzer insights like memory leak detection, performance bottlenecks, and event pattern analysis.
Usage
# Run a test file
mix excessibility.debug test/my_test.exs
# Run a specific test by line number
mix excessibility.debug test/my_test.exs:42
# Run tests with a tag
mix excessibility.debug --only live_view
# Run a describe block
mix excessibility.debug test/my_test.exs:10
# With debug options
mix excessibility.debug test/my_test.exs --format=json
mix excessibility.debug test/my_test.exs --full
mix excessibility.debug test/my_test.exs --minimal
mix excessibility.debug test/my_test.exs --highlight=current_user,cart_itemsFlags
--format=markdown|json|package|digest- Output format (default: markdown)--full- Disable all filtering, show complete assigns--minimal- Timeline only, no detailed snapshots--no-filter-ecto- Keep Ecto metadata (meta, NotLoaded)--no-filter-phoenix- Keep Phoenix internals (flash, changed)--highlight=field1,field2- Custom fields to highlight in timeline
Analysis Options
--analyze=NAMES- Run specific analyzers (comma-separated). Available: memory, performance, data_growth, event_pattern, ecto_query_analysis, state_machine--analyze=all- Run all available analyzers--profile=NAME- Use a predefined profile (quick, memory, performance, full)--no-analyze- Skip analysis, show timeline only--verbose- Show detailed stats even when no issues found
Query Plan Evidence (opt-in, Postgres-only)
--plan- Boolean flag. Capture value-freeEXPLAINplan evidence for each SELECT and attach it to the digest's query shapes. RunsEXPLAIN (FORMAT JSON) <query>— it plans but never executes the query, so it touches no data. SELECT-only.--plan-analyze- Boolean flag. CaptureEXPLAIN ANALYZEplan evidence, which includes actual row counts. This executes the query, so it is double-gated: it additionally requiresconfig :excessibility, query_plan_allow_analyze: true. Only run inside a DB sandbox / read-only environment.
Both are bare boolean flags and can be combined with a test path in any
order, e.g. mix excessibility.debug --plan test/foo.exs or
mix excessibility.debug test/foo.exs --plan.
Safety notes:
- SELECT-only. Only
SELECTqueries are ever run throughEXPLAIN; non-SELECT statements are never re-executed. EXPLAINdoes notANALYZEby default. Plain--planrunsEXPLAIN (FORMAT JSON) <query>, which plans but never executes the query, so it touches no data.ANALYZEis double-gated.--plan-analyzeexecutes the query to gather real row counts, so it additionally requiresconfig :excessibility, query_plan_allow_analyze: true. Without that config it downgrades to plainEXPLAINwith a warning. Only runANALYZEinside a DB sandbox.
Benchmark Mode (opt-in)
--benchmark=N- Run the test N times and write a value-freebenchmark.jsonwith robust cold/warm timing stats (median + MAD) per(view, callback)and per query-fingerprint. Sample 1 is treated as cold (compilation, connection warmup, cold caches); samples 2..N are warm, and the two are reported separately so a cold first run cannot poison the median.Timing is diagnostic ONLY and never enters the digest. An advisory outlier (a warm sample beyond
median + k*mad) means "green = no relative outlier in these samples, not 'fast'." It is never a pass/fail gate.mix excessibility.debug --benchmark=20 test/my_live_view_test.exs
Formats
markdown(default) - Human and AI-readable report with inline HTMLjson- Structured JSON output for programmatic parsingpackage- Creates a directory with MANIFEST, timeline, and all snapshotsdigest- Prints the value-freedigest.jsonruntime-evidence artifact
Output
The command outputs the report to stdout and also saves it to:
- Markdown:
test/excessibility/latest_debug.md - JSON:
test/excessibility/latest_debug.json - Timeline:
test/excessibility/timeline.json(always generated) - Package:
test/excessibility/debug_packages/[test_name]_[timestamp]/