talira

PHP debugger: clear error pages, a debug bar, variable dumps and production error logging

open sourceBSD-3-Clause OR GPL-2.0-only OR GPL-3.0-onlyfree

Tracy is an open source PHP debugging tool from Nette, usable on its own in any PHP codebase. In development it replaces PHP's error output with clear error pages that show the full context (and fatal errors too), suggests fixes such as 'did you mean $greeting?', adds the floating Tracy Bar with timing, memory and database figures and panels from plugins, and dumps variables readably. In production it detects the environment, shows visitors a friendly message instead, logs errors and exceptions, and can email you about new errors. File names on error pages open in your editor at the right line.

Problems it solves

  • see a clear error page with context when my PHP code breaks
  • log PHP errors in production and get an email when a new one happens
  • dump variables and measure time while debugging a PHP app

Features

  • error pages with full context, including fatal errors
  • suggested fixes on PHP notices
  • Tracy Bar with timing, memory and database panels, extensible with plugins
  • readable variable dumps, hidden in production
  • production mode: logs errors and exceptions and emails you about new ones
  • opens files from error pages in your editor at the right line
  • timers for measuring code

Limitations

  • needs PHP 8.2 to 8.61

Alternatives

The same job

These do what Tracy does.

  1. PsySH Interactive shell, runtime console and debugger for PHP
  2. Whoops PHP error handler framework with a readable debug error page

Compare Tracy with the top 3