Search by

webware / traccio

tyrsson

Tracy Debugger integration and profiler for Mezzio apps.

Package info

github.com/webinertia/traccio

pkg:composer/webware/traccio

Statistics

Installs: 1 468

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 1

1.1.0 2026-10-22 04:02 UTC

README

PHP Version Latest Version License Continuous Integration codecov Mutation testing badge

Tracy Debugger integration and profiler for Mezzio applications.

Traccio wires Tracy into a Mezzio middleware pipeline and provides purpose-built debug bar panels for configuration, routes, HTTP requests, and SQL query profiling.

Documentation

Requirements

Requirement Version
PHP ~8.2 || ~8.3 || ~8.4 || ~8.5
tracy/tracy ^2.11
mezzio/mezzio ^3.26 (host app)

Database profiling additionally requires a PhpDb adapter and the php-db/phpdb package.

Quick start

1. Install

composer require webware/traccio

2. Register the ConfigProvider

The laminas-component-installer plugin offers to do this for you.

// config/config.php
use Laminas\ConfigAggregator\ConfigAggregator;
use Webware\Traccio\ConfigProvider;

$aggregator = new ConfigAggregator([
    ConfigProvider::class,
    // ... other providers
]);

3. Enable debug

// config/autoload/traccio.global.php
use Tracy\Debugger;

return [
    'debug'         => true,
    Debugger::class => [
        'enable' => Debugger::Development,
    ],
];

4. Pipe the middleware

// config/pipeline.php
use Webware\Traccio\Http\Middleware\TracyDebuggerMiddleware;

$app->pipe(TracyDebuggerMiddleware::class);

Pipe it first, so Tracy is initialised before your application runs. Panels appear automatically when their dependencies are present in the container.

Panels

Panel Bar label Requires
ConfigPanel Config nothing
RoutesPanel Routes Mezzio\Router\RouteCollectorInterface
SqlProfilerPanel Database PhpDb\Adapter\Profiler\ProfilerInterface
RequestPanel Request RequestPanelMiddleware piped late

See Configuration for every option, the full Tracy property list, and database profiling setup.

License

BSD-3-Clause. See LICENSE for details.