Hey! Keep up to date with the project through its beta and public launch by following @getsparks.

 
0
2
0
727 Installs

Basic Information: tracer

Tracer out vars and arrays recursively in an easy to manage manner

Contributor : dperrymorrow
Email : Log in to view
Author Website : http://www.newfinds.com
Spark Website : http://newfinds.com/code-igniter-sparks/tracer/
Repository Type : git
Number of Installs : 727

Get the Latest

  • 0.6.0 Pushed June 23rd, 2011
    php tools/spark install -v0.6.0 tracer Or download this version manually: Get tracer-0.6.0.zip

How-To

Tracer Helper Spark

This is a very simple yet useful helper for tracing out data while you are working. Will trace out strings and arrays recursively.

Features Overview

  • You choose to exit PHP after the trace or not
  • Trace all queries called and benchmark of each one
  • Can trace entire set of vars passed to the view via Loader class
  • Can trace out all benchmarks set
  • File name and line number included as a backtrace from where the trace was called
  • Easily setup environment switching to keep traces off your staging and production boxes
  • Easily style the traces with the externalized styles and view template in the views folder

Table Torch

Example Usage: ( x.x indicates the version you have installed on your build )

// from a controller 

function index(){
    $this->load->spark( 'tracer/x.x' );
    // keep on rendering page if false ( default )
    trace( $_SERVER, FALSE );
    // exit php and rendering if true
    trace( $_SERVER, TRUE );
}

To Trace Out All View Vars

You can also trace out everything that was passed to your view. This must be called after you load view and pass data via $this->load->view( 'viewname', $data ); See http://codeigniter.com/user_guide/libraries/loader.html for more information on views and data.

trace_viewdata( TRUE ); // will exit if true, no if false

Thats it!!

Older Versions

  • 0.5.0 Pushed March 12th, 2011
    php tools/spark install -v0.5.0 tracer Or download this version manually: Get tracer-v0.5.zip
  • 0.3.0 Pushed March 8th, 2011
    php tools/spark install -v0.3.0 tracer Or download this version manually: Get tracer-v0.3.zip
  • 0.2.0 Pushed March 8th, 2011
    php tools/spark install -v0.2.0 tracer Or download this version manually: Get tracer-v0.2.zip
  • 0.1.0 Pushed March 7th, 2011
    php tools/spark install -v0.1.0 tracer Or download this version manually: Get tracer-v0.1.zip

Comments

blog comments powered by Disqus