# `mix excessibility.debug`
[🔗](https://github.com/lessthanseventy/excessibility/blob/v0.18.1/lib/mix/tasks/excessibility_debug.ex#L1)

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_items

## Flags

- `--format=markdown|json|package` - 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

## Formats

- `markdown` (default) - Human and AI-readable report with inline HTML
- `json` - Structured JSON output for programmatic parsing
- `package` - Creates a directory with MANIFEST, timeline, and all snapshots

## 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]/`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
