All posts tagged ‘debugging’

Blackbird Tool Makes JavaScript Alert() Debugging Obsolete

If you’re debugging JavaScript, you’ll probably be interested in something a little more comprehensive than alert(). Blackbird adds some control and specificity to the debugging messages you install into your code to see if it is working. It also makes the debugging window a little more controllable than the error message that pops up for an alert().

It does so by adding a floating black table (seen to the right) that you can use to log different errors and data points throughout your code. It makes debugging a cinch, and it helps you figure out what you’re doing wrong in a much more visible manner than adding alerts.

Blackbird is installed by adding a link in your page to some lightweight, downloadable JavaScript and CSS. Open the pop-up logging window using the F2 key. Other F2 variations will move the window, make it larger and close it.

The developers of blackbird promise you’ll never use alert() again. Check out the Blackbird webpage for code and live examples of the coding box and the kind of messages you can install in your page.

This isn’t a replacement for other debugging tools, like Firebug. However, unlike Firebug and like HTML design debugging tool XRAY or Firebug Lite, it works over any modern browser without a software installation.

See Also

File Under: Programming

Simplify Django Debugging With New Toolbar

Django toolbar in action

Django developer Rob Hudson has built an extensible Django Debug Toolbar for viewing common information, such as HTTP headers and SQL queries. When installed and enabled, the toolbar takes up less than thirty pixels at the top of the screen. You can click one of the panels (there are currently seven available) and an overlay opens for that panel.

The inspiration came from the Symfony Project, a PHP framework. Hudson announced his project after Cal Henderson showed something similar for Pownce at DjangoCon during Henderson’s Why I Hate Django talk. Later, Hudson collaborated with fellow developer David Cramer, so the toolbar grew out of the Django community.

One of the coolest things about the project is that each panel is separate. So, if you don’t want the one that shows the current version, you don’t have to include it. Even better, if it’s missing functionality you want, or there’s something specific to your project you want to show in the debug toolbar, you can write your own panel.

Unlike many of the toolbars we see, this one is not installed in the browser. It resides on the same server as your Django installation. It’s meant for developers, not end-users, so it only shows when it matches the IP addresses added to the INTERNAL_IPS Django setting.

[Screenshot by David Cramer]

See also: