PHP Runtime Tracer for debugging
- require or autoload
Tracer
at the top of your execution scripts, usuallyindex.php
. Then initialize it.
Example:
require_once 'tracer.php';
Tracer::init();
- Start adding data into
Tracer
Tracer::add('name', 'any type of data');
- Upon page exit,
Tracer::__destruct
will be called to show your desired code trace.
Example:
- xdebug for code coverage [OPTIONAL]
Other xdebug tracer tools you could consider: