<?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/"
	xmlns:series="http://organizeseries.com/"
		>
<channel>
	<title>Comments on: Advanced JavaScript Debugging Techniques</title>
	<atom:link href="http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/</link>
	<description>SitePen Services and notes about Dojo, Persevere, CometD, JavaScript, and the Web</description>
	<lastBuildDate>Thu, 23 May 2013 01:35:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>By: NYWebTeam</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-90798</link>
		<dc:creator>NYWebTeam</dc:creator>
		<pubDate>Sat, 04 Apr 2009 03:21:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-90798</guid>
		<description><![CDATA[We are using Charles, Fiddler and Firebug. They all great, and more than enough for our needs.

F.]]></description>
		<content:encoded><![CDATA[<p>We are using Charles, Fiddler and Firebug. They all great, and more than enough for our needs.</p>
<p>F.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ayound</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-90308</link>
		<dc:creator>ayound</dc:creator>
		<pubDate>Tue, 25 Nov 2008 03:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-90308</guid>
		<description><![CDATA[JSDT(Javascript Debug Toolkit) is a eclipse plugin used to debug javascript cross browser， jsdt can used in IE ,FIREFOX ,SAFARI,CHROME browsers and so on.

http://code.google.com/p/jsdt/wiki/newFeatures]]></description>
		<content:encoded><![CDATA[<p>JSDT(Javascript Debug Toolkit) is a eclipse plugin used to debug javascript cross browser， jsdt can used in IE ,FIREFOX ,SAFARI,CHROME browsers and so on.</p>
<p><a href="http://code.google.com/p/jsdt/wiki/newFeatures" rel="nofollow">http://code.google.com/p/jsdt/wiki/newFeatures</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mwilcox</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-88941</link>
		<dc:creator>mwilcox</dc:creator>
		<pubDate>Tue, 28 Oct 2008 01:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-88941</guid>
		<description><![CDATA[Recently I thought of a cool trick. When you have a lot of vars to log, stick them in an object, and log it with dir():

console.dir({
	b:b,
	bc:bc,
	tableSelector:tableSelector,
	tableStyle:tableStyle,
	pad:this.getPadding(),
	space:this.getSpace(),
	width:this.getWidth()
});]]></description>
		<content:encoded><![CDATA[<p>Recently I thought of a cool trick. When you have a lot of vars to log, stick them in an object, and log it with dir():</p>
<p>console.dir({<br />
	b:b,<br />
	bc:bc,<br />
	tableSelector:tableSelector,<br />
	tableStyle:tableStyle,<br />
	pad:this.getPadding(),<br />
	space:this.getSpace(),<br />
	width:this.getWidth()<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sathya</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87946</link>
		<dc:creator>sathya</dc:creator>
		<pubDate>Fri, 10 Oct 2008 17:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87946</guid>
		<description><![CDATA[Break Point Debugging &gt;&gt; Step-Wise Debugging is not working in Venkman for me even after making isDebug &amp; debugAtAllCosts true. Am I missing anything?

I am able to set break point, but control is not coming there.

Please advise.]]></description>
		<content:encoded><![CDATA[<p>Break Point Debugging &gt;&gt; Step-Wise Debugging is not working in Venkman for me even after making isDebug &amp; debugAtAllCosts true. Am I missing anything?</p>
<p>I am able to set break point, but control is not coming there.</p>
<p>Please advise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mic Cvilic</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87312</link>
		<dc:creator>Mic Cvilic</dc:creator>
		<pubDate>Fri, 06 Jun 2008 13:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87312</guid>
		<description><![CDATA[If you are on MS Windows and need to debug javascript in Internet Explorer you should give a try to VWD (Visual Web Developer Express Edition).

It has HTML, JS, CSS,XML,... editing helpers.
A very powerful javascript debugger.
An integrated web server, and... it is FREE!

I used it happily for years.
One sad thing, the XSLT debugging is not available in the free version.

As I moved to a Mac now, I switched to an Emacs-Firefox+Firebug environment.]]></description>
		<content:encoded><![CDATA[<p>If you are on MS Windows and need to debug javascript in Internet Explorer you should give a try to VWD (Visual Web Developer Express Edition).</p>
<p>It has HTML, JS, CSS,XML,&#8230; editing helpers.<br />
A very powerful javascript debugger.<br />
An integrated web server, and&#8230; it is FREE!</p>
<p>I used it happily for years.<br />
One sad thing, the XSLT debugging is not available in the free version.</p>
<p>As I moved to a Mac now, I switched to an Emacs-Firefox+Firebug environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariam</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87299</link>
		<dc:creator>Mariam</dc:creator>
		<pubDate>Tue, 03 Jun 2008 04:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87299</guid>
		<description><![CDATA[hi iam mariam i want to make a calculator by form function in javascript from wich code ican add sin , log pleas tell me]]></description>
		<content:encoded><![CDATA[<p>hi iam mariam i want to make a calculator by form function in javascript from wich code ican add sin , log pleas tell me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonah Dempcy</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87206</link>
		<dc:creator>Jonah Dempcy</dc:creator>
		<pubDate>Tue, 06 May 2008 03:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87206</guid>
		<description><![CDATA[@Dylan: Thanks for the tip! I&#039;ll start doing this, and now I can use multi-line comments again.

I&#039;ll look into Dojo&#039;s debug mode. I wrote an article about rewriting console.log statements with a debug mode flag:

http://www.thetruetribe.com/2008/04/redefining-consolelog-for-browsers.html]]></description>
		<content:encoded><![CDATA[<p>@Dylan: Thanks for the tip! I&#8217;ll start doing this, and now I can use multi-line comments again.</p>
<p>I&#8217;ll look into Dojo&#8217;s debug mode. I wrote an article about rewriting console.log statements with a debug mode flag:</p>
<p><a href="http://www.thetruetribe.com/2008/04/redefining-consolelog-for-browsers.html" rel="nofollow">http://www.thetruetribe.com/2008/04/redefining-consolelog-for-browsers.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dylan</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87162</link>
		<dc:creator>Dylan</dc:creator>
		<pubDate>Sat, 26 Apr 2008 05:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87162</guid>
		<description><![CDATA[@Jonah: something I tend to use instead of /* */ is if(0){} blocks... works as well as comments, and they can be nested.

in Dojo, we do have a flag for debugging being on or off, though we use this mostly for whether console.log and console.debug statements are executed with Firebug or Firebug Lite rather than a way of suppressing all exceptions.]]></description>
		<content:encoded><![CDATA[<p>@Jonah: something I tend to use instead of /* */ is if(0){} blocks&#8230; works as well as comments, and they can be nested.</p>
<p>in Dojo, we do have a flag for debugging being on or off, though we use this mostly for whether console.log and console.debug statements are executed with Firebug or Firebug Lite rather than a way of suppressing all exceptions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonah Dempcy</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87161</link>
		<dc:creator>Jonah Dempcy</dc:creator>
		<pubDate>Sat, 26 Apr 2008 03:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87161</guid>
		<description><![CDATA[Excellent post! I&#039;ve bookmarked it and will certainly return to it when I am frustrated and banging my head against the wall over a JavaScript bug. Having a list of debugging techniques on hand is great for when you&#039;re stuck.

Things that have served me well thus far are developing for Firefox first and foremost and patching for IE as necessary, and making extensive use of Firefox&#039;s Firebug JavaScript console and debugger. Being able to set conditional breakpoints, log messages and check the state of the DOM at any point during execution is invaluable. I just wish there was something as full-featured for IE! In all fairness, there is a small offering by way of the Script Editor (and the even-worse Script Debugger). But, it doesn&#039;t feature a fraction of the functionality or user-friendliness of Firebug.

As for shotgun debugging, one thing that my friend Lowell pointed out is that commenting out large blocks of code is easy if you use two slashes for your code (//). It&#039;s more difficult if you use /* */ since each time you do that, you&#039;ll need to add another opening comment. For this reason, he always uses two slashes for comments and uses the other style of multi-line commenting exclusively for commenting out code.

One other point in this discussion: Depending on the JavaScript library or framework in use, exceptions will sometimes be swallowed and the application will silently fail. This has happened to me quite a bit when using Prototype/Scriptaculous as well as at times with jQuery. Interestingly enough, MooTools seems to be really good at raising exceptions. Is there a philosophy behind this? For example, don&#039;t raise the exceptions for users as it will cause an annoying error popup in Internet Explorer?

It seems that libraries would benefit from having a &quot;development mode&quot; flag that you set when you are coding the site, and turn off when deploying to the live production server. When the flag is on, exceptions would be raised, but you could disable it before deployment and errors would cause silent failure.

One final thought-- do you do much error handling outside of checking an Ajax response from the server? I can&#039;t think of many times where I would try() catch() something. Instead, if there is the possibility something would be undefined, I check if (typeof obj == &quot;undefined&quot;). It&#039;s been working pretty well for me so far but I&#039;m wondering what some cases would be that I might use error handling.

-Jonah Dempcy
www.thetruetribe.com]]></description>
		<content:encoded><![CDATA[<p>Excellent post! I&#8217;ve bookmarked it and will certainly return to it when I am frustrated and banging my head against the wall over a JavaScript bug. Having a list of debugging techniques on hand is great for when you&#8217;re stuck.</p>
<p>Things that have served me well thus far are developing for Firefox first and foremost and patching for IE as necessary, and making extensive use of Firefox&#8217;s Firebug JavaScript console and debugger. Being able to set conditional breakpoints, log messages and check the state of the DOM at any point during execution is invaluable. I just wish there was something as full-featured for IE! In all fairness, there is a small offering by way of the Script Editor (and the even-worse Script Debugger). But, it doesn&#8217;t feature a fraction of the functionality or user-friendliness of Firebug.</p>
<p>As for shotgun debugging, one thing that my friend Lowell pointed out is that commenting out large blocks of code is easy if you use two slashes for your code (//). It&#8217;s more difficult if you use /* */ since each time you do that, you&#8217;ll need to add another opening comment. For this reason, he always uses two slashes for comments and uses the other style of multi-line commenting exclusively for commenting out code.</p>
<p>One other point in this discussion: Depending on the JavaScript library or framework in use, exceptions will sometimes be swallowed and the application will silently fail. This has happened to me quite a bit when using Prototype/Scriptaculous as well as at times with jQuery. Interestingly enough, MooTools seems to be really good at raising exceptions. Is there a philosophy behind this? For example, don&#8217;t raise the exceptions for users as it will cause an annoying error popup in Internet Explorer?</p>
<p>It seems that libraries would benefit from having a &#8220;development mode&#8221; flag that you set when you are coding the site, and turn off when deploying to the live production server. When the flag is on, exceptions would be raised, but you could disable it before deployment and errors would cause silent failure.</p>
<p>One final thought&#8211; do you do much error handling outside of checking an Ajax response from the server? I can&#8217;t think of many times where I would try() catch() something. Instead, if there is the possibility something would be undefined, I check if (typeof obj == &#8220;undefined&#8221;). It&#8217;s been working pretty well for me so far but I&#8217;m wondering what some cases would be that I might use error handling.</p>
<p>-Jonah Dempcy<br />
<a href="http://www.thetruetribe.com" rel="nofollow">http://www.thetruetribe.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eric casteleijn</title>
		<link>http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/comment-page-1/#comment-87089</link>
		<dc:creator>eric casteleijn</dc:creator>
		<pubDate>Sun, 06 Apr 2008 18:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepen.com/blog/2008/04/03/advanced-javascript-debugging-techniques/#comment-87089</guid>
		<description><![CDATA[A friend of mine built an interactive javascript shell, which (sort of like the python interpreter) allows you to check a lot of things in isolation, but with all browser objects available. Pretty cool stuff, and occasionally very nice for debugging:

http://johnnydebris.net/projects/jsshell/jsshell.html]]></description>
		<content:encoded><![CDATA[<p>A friend of mine built an interactive javascript shell, which (sort of like the python interpreter) allows you to check a lot of things in isolation, but with all browser objects available. Pretty cool stuff, and occasionally very nice for debugging:</p>
<p><a href="http://johnnydebris.net/projects/jsshell/jsshell.html" rel="nofollow">http://johnnydebris.net/projects/jsshell/jsshell.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
