2006年12月13日

JavaScript Debugging Tool





Disclaimer
The author does not accept responsibility for any effects, adverse or otherwise, that this code may have on you, your computer, your sanity, your dog, and anything else that you can think of. Use it at your own risk. (Deja Vu? I also love the Allegro disclaimer.)

Quick and dirty tour
So you don't like to read all articles you see on the web, or you don't have time for it? Then, just download the source files, and open the "debugDemo.htm" file on your favorite browser.

Background
Although the inner works require you to be an advanced web developer to understand and improve it, you need only to have basic knowledge of HTML and JavaScript to use the tool.

Introduction
Alright, you may be thinking right now: "I have the last Fire Bug extension for FireFox, I've got my WebDev bar for Fire Fox and Internet Explorer, and even Opera has a concrete JavaScript console. Why would I care about a tool for JavaScript debugging?". Well, please, let me try to convince you!

The need for a debug tool
Although browsers have their JavaScript console, it's mostly common to see people still use those famous alert("I'm here!") code all along their HTML code. In most development environments, it is recommended, if not required, that you get yourself a Fire Bug like extension to improve your debugging capabilities. However, sometimes, you need to deal with browsers that do not have such debugging power, or maybe you just can't install extensions. You may also need a place to write variable values as time goes by and as events occur on your page without thoese annoying alert pop-ups interrupting your navigation. You may also need more robust exception handling on your code, to help you debug systems, even when they are already deployed on servers. Enough talking, let's get to the code!

The debug tool

來源:http://www.codeproject.com/jscript/Javascript_Debugging_Tool.asp

沒有留言: