Code Monkey home page Code Monkey logo

codeigniter-tracer-helper's Introduction

Tracer Helper Spark

if you are using CI 2.0.2 you need to read this article before using my, or any other sparks for that matter. 2.0.2 has a bug with the loader class that breaks the sparks MY_Loader extension thereof. http://codefury.net/2011/05/getsparks-org-beta-released-big-changes/

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!!

codeigniter-tracer-helper's People

Contributors

dperrymorrow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.