At the Forge - Firebug

 in
Firebug is a brilliant means of debugging Ajax applications.

which, on the Linux Journal home page, produces the following form header:

<form id="cvb_form" action="/" method="get">

Firebug also has extensive capabilities for monitoring functions, setting breakpoints and profiling functions. Go to the Script button, and you are greeted by the source code for an included JavaScript file. (You can change the file you're looking at by choosing from a menu.) Pointing to a line of code with the mouse cursor brings up information about the current state of those objects.

Clicking on the code allows you to set a breakpoint (including a conditional breakpoint) to copy the function (useful when trying to communicate with other programmers or even when writing a column about programming) or to handle a breakpoint by continuing or stepping through the code.

To find out which JavaScript functions have been taking the most time, and which are invoked most frequently, use Firebug's profiler. It's amazingly simple to use. Click on the Console/Profile button, and then go about your business, using the Web site as much or as little as you want. When you click the Profile button again, Firebug reports the number of times each JavaScript function was called, the time each call took and where each function is defined.

Finally, the Net button makes it easy to keep track of any Ajax calls embedded in the page. Clicking on Net and XHR produces a graphical indication of the Ajax calls that have been made on this page, as well as how long each took to execute. If you are developing an Ajax application, this is the best way to find out where your bottlenecks are.

Conclusion

It's rare for me to call a product revolutionary, but I am sorely tempted to do so in the case of Firebug. It puts a lot of information in one nicely designed, easy-to-use package. The ability to interact with my packages has a vaguely Lisp-like feel, in that I'm suddenly interacting with a live environment. Firebug has given me the ability to “see” what my pages are doing and to better understand them.

Firebug has become an indispensable tool in my arsenal, alongside the Web Developer extension. In this way, Firefox is beginning to demonstrate that it is indeed a platform for Internet applications, rather than merely a Web browser.

Reuven M. Lerner, a longtime Web/database consultant, is a PhD candidate in Learning Sciences at Northwestern University in Evanston, Illinois. He currently lives with his wife and three children in Skokie, Illinois. You can read his Weblog at altneuland.lerner.co.il.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix