/tracer

PHP Runtime Tracer for debugging

Primary LanguagePHP

tracer

PHP Runtime Tracer for debugging

Usage

  1. require or autoload Tracer at the top of your execution scripts, usually index.php. Then initialize it.
    Example:
require_once 'tracer.php';
Tracer::init();
  1. Start adding data into Tracer
Tracer::add('name', 'any type of data');
  1. Upon page exit, Tracer::__destruct will be called to show your desired code trace.
    Example:

Requirement

  1. xdebug for code coverage [OPTIONAL]

Alternatives

Other xdebug tracer tools you could consider:

  1. https://github.com/troelskn/php-tracer-weaver
  2. https://github.com/dainbrump/Tracer