Appendix B. Development Tools

When a problem comes along

You must whip it

—Devo,

"Whip It"

Documentation can help in troubleshooting issues with our JavaScript applications, but there is no replacement for a good set of software development tools. Fortunately, there are many software packages available for inspecting and debugging JavaScript code, and most of them are available for free.

Tools for Firefox

Mozilla Firefox is the browser of choice for the lion’s share of web developers, and therefore has some of the most extensive and well-respected development tools.

Firebug

The Firebug extension for Firefox is indispensable for jQuery development:

Some of the features of Firebug are :

http://www.getfirebug.com/

  • An excellent DOM inspector for finding names and selectors for pieces of the document

  • CSS manipulation tools for finding out why a page looks a certain way and changing it

  • An interactive JavaScript console

  • A JavaScript debugger that can watch variables and trace code execution

Web Developer Toolbar

This not only overlaps Firebug in the area of DOM inspection, but also contains tools for common tasks like cookie manipulation, form inspection, and page resizing. You can also use this toolbar to quickly and easily disable JavaScript for a site to ensure that functionality degrades gracefully when the user’s browser is less capable:

http://chrispederick.com/work/web-developer/

Venkman

Venkman is the official JavaScript debugger for the Mozilla project. It provides a troubleshooting environment that is reminiscent of the GDB system for debugging programs that are written in other languages.

http://www.mozilla.org/projects/venkman/

Regular Expressions Tester

Regular expressions for matching strings in JavaScript can be tricky to craft. This extension for Firefox allows easy experimentation with regular expressions using an interface for entering search text:

http://sebastianzartner.ath.cx/new/downloads/RExT/

Tools for Internet Explorer

Sites often behave differently in IE than in other web browsers, so having debugging tools for this platform is important.

Microsoft Internet Explorer Developer Toolbar

The Developer Toolbar primarily provides a view of the DOM tree for a web page. Elements can be located visually, and modified on the fly with new CSS rules. It also provides other miscellaneous development aids, such as a ruler for measuring page elements:

http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038

Microsoft Visual Web Developer

Microsoft’s Visual Studio package can be used to inspect and debug JavaScript code:

http://msdn.microsoft.com/vstudio/express/vwd/

To run the debugger interactively in the free version (Visual Web Developer Express), follow the process outlined here:

http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/

DebugBar

The DebugBar provides a DOM inspector as well as a JavaScript console for debugging:

http://www.debugbar.com/

Drip

Memory leaks in JavaScript code can cause performance and stability issues for Internet Explorer. Drip helps to detect and isolate these memory issues:

http://Sourceforge.net/projects/ieleak/

Tools for Safari

Safari remains the new kid on the block as a development platform, but there are still tools available for situations in which code behaves differently in this browser than elsewhere.

Web Inspector

Nightly builds of Safari include the ability to inspect individual page elements and collect information especially about the CSS rules that apply to each one.

http://trac.webkit.org/projects/webkit/wiki/Web%20Inspector

Drosera

Drosera is the JavaScript debugger for Safari and other WebKit-driven applications. It enables breakpoints, variable watching, and an interactive console.

Other Tools

Firebug Lite

Though the Firebug extension itself is limited to the Firefox web browser, some of the features can be replicated by including the Firebug Lite script on the web page. This package simulates the Firebug console, including allowing calls to console.log() which usually causes JavaScript errors to be thrown in other browsers:

http://www.getfirebug.com/lite.html

TextMate jQuery Bundle

This extension for the popular Mac OS X text editor TextMate provides syntax highlighting for jQuery methods and selectors, code completion for methods, and a quick API reference from within your code. The bundle is also compatible with the E text editor for Windows:

http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery

Charles

When developing AJAX-intensive applications, it can be useful to see exactly what data is being sent between the browser and the server. The Charles web debugging proxy displays all HTTP traffic between two points, including normal web requests, HTTPS traffic, Flash remoting, and AJAX responses:

http://www.xk72.com/charles/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.17.40