<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: dbug &#8211; a console.log (firebug) wrapper</title>
	<atom:link href="http://www.clientcide.com/best-practices/dbug-a-consolelog-firebug-wrapper/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clientcide.com/best-practices/dbug-a-consolelog-firebug-wrapper/</link>
	<description>Making stuff work on the other side of the request.</description>
	<lastBuildDate>Thu, 12 Jan 2012 20:00:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: nfaugout</title>
		<link>http://www.clientcide.com/best-practices/dbug-a-consolelog-firebug-wrapper/comment-page-1/#comment-22959</link>
		<dc:creator>nfaugout</dc:creator>
		<pubDate>Fri, 16 Nov 2007 14:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://clientside.cnet.com/?p=144#comment-22959</guid>
		<description>Very usefull code indeed!
For those who just want not to crash brothers without Firebug, I have make a &lt;a href=&quot;http://ajax-prototype.blogspot.com/2006/12/workaround-to-make-firebug-consolelog.html&quot; rel=&quot;nofollow&quot;&gt;very little code here&lt;/a&gt;.
The good think is you can keep writing console.log in your code.</description>
		<content:encoded><![CDATA[<p>Very usefull code indeed!<br />
For those who just want not to crash brothers without Firebug, I have make a <a href="http://ajax-prototype.blogspot.com/2006/12/workaround-to-make-firebug-consolelog.html" rel="nofollow">very little code here</a>.<br />
The good think is you can keep writing console.log in your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron N.</title>
		<link>http://www.clientcide.com/best-practices/dbug-a-consolelog-firebug-wrapper/comment-page-1/#comment-49</link>
		<dc:creator>Aaron N.</dc:creator>
		<pubDate>Thu, 21 Sep 2006 00:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://clientside.cnet.com/?p=144#comment-49</guid>
		<description>Update: I&#039;ve modified this so that when dbug is disabled, it stores up the messages that have been logged. When you call dbug.enable() in your code or in the console, then it dumps all previously logged messages to the console (and empties the buffer). This means you don&#039;t have to put &quot;?dbug=true&quot; to the url of the page to see the log; you can just enable it at any point and see any messages you might have missed.

&lt;pre&gt;&lt;code&gt;//debug wrapper for firefox firebug console
dbug = {
	logged: [],	firebug: false, debug: false, 
	log: function(msg) {this.logged.push(msg);},
	enable: function() { if(this.firebug) this.debug = true; this.log = console.debug; this.log(&#039;enabling dbug&#039;);
		db = this; this.logged.each(function(msg){db.log(msg)}); this.logged=[];
	}, 
	disable: function(){ if(this.firebug) this.debug = false; this.log = function(){this.logged.push(msg);}; }
}
if (typeof console != &quot;undefined&quot;) { // safari, firebug
	if (typeof console.debug != &quot;undefined&quot;) { // firebug
		dbug.firebug = true; if(window.location.href.indexOf(&quot;debug=true&quot;)&gt;0) dbug.enable();
	}
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Update: I&#8217;ve modified this so that when dbug is disabled, it stores up the messages that have been logged. When you call dbug.enable() in your code or in the console, then it dumps all previously logged messages to the console (and empties the buffer). This means you don&#8217;t have to put &#8220;?dbug=true&#8221; to the url of the page to see the log; you can just enable it at any point and see any messages you might have missed.</p>
<pre><code>//debug wrapper for firefox firebug console
dbug = {
	logged: [],	firebug: false, debug: false,
	log: function(msg) {this.logged.push(msg);},
	enable: function() { if(this.firebug) this.debug = true; this.log = console.debug; this.log('enabling dbug');
		db = this; this.logged.each(function(msg){db.log(msg)}); this.logged=[];
	},
	disable: function(){ if(this.firebug) this.debug = false; this.log = function(){this.logged.push(msg);}; }
}
if (typeof console != "undefined") { // safari, firebug
	if (typeof console.debug != "undefined") { // firebug
		dbug.firebug = true; if(window.location.href.indexOf("debug=true")>0) dbug.enable();
	}
}</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>

