
There are lots of debug options for javascript developers. Many do much more than this such as breakpoints and all that. But many times I find myself just needing something simple and quick to debug something or find out why something is not acting as desired.
I made this debug module when I was working on a intensive UI that I frequently needed to trace out items. Even though I had tools available to me, i found myself using alert() often which gets old very fast.
[javascript]
$( document ).ready( function(){
var myObj = {foobar:true, content:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut."};
// call the Tracer object, then trace method.
Tracer.trace( myObj );
});
[javascript]
Tracer.globalEnable = false;