I've blogged before about making use of audible feedback for debugging. One of the things I'd like to eventually get around to doing for WebKit's Web Inspector is to add first class audible breakpoints. Just like you can "click" on a line to add a breakpoint where the debugger will stop the next time that location is reached in your program, an audible breakpoint wouldn't stop, but play a sound clip instead.
There's some infrastructure that needs to be added to Web Inspector before tackling that feature, so I figured I'd go on the cheap instead. Using HTML5's new
audio element, I created a
beep() function which just plays a sound clip when invoked. Wherever you might put a
console.log() invocation, you can put a
beep() invocation instead. Actually, I created a
boop() function also; a single sound is rather boring.
Of course, having to modify your source for debugging is so 1980's. So my
The sample code is up here: web-beep. Seems to run fine in Safari and FireFox 3.5.