Javascript debug with Firebug (console.log)
Do you waste countless hours debugging Javascript trying to figure out what it is happening? Alert much? Sometimes the simplest solutions are hidden in plain sight.
Look no more, just use this in your code…
console.log('so easy...:', yourVarObjectWhatever);
Then, just open up your Firebug console (you’re using it right?) and marvel at the wondreous info you were looking for all along. In a way it’s similar to a var_dump from PHP.
Yep, I didn’t know either.
Advertisement
Categories: Firebug, Javascript, Web Development