Reverse Engineering Javascript

The beauty of a Web Application is reflected in the way it has it Javascript, CSS and HTML is structured. Reading well written Javascript is fun in itself, exploring the "behind the screens" of interesting web pages can soon grow obsessive.
However, with Javascript obfuscation and minimization, it becomes really difficult to understand the nuances and flow of the page. In addition to this, since Javascript is usually associated with events, looking at the objects in isolation, with comments removed is seldom useful. Though firebug can appear to be a very helpful tool, there are still some features that I would really want.
Firstly, I would like to add break points no only to line numbers, but also break on events. The notion of "break on next mouse click" would be an interesting problem to solve, specially given the event bubbling model in the browser. If this was configurable, the exact code executed during a particular event can be caught easily during a reverse engineering exploration.
Another interesting feature would be the option of pretty print. This was a feature that was available in Venkman, but that was not very great. Given the inherent problem with the Javascript language about the end of termination token, this is not an easy problem to solve. However, associating firebug to an external editor (eg. aptana) could be a great idea as that would give a syntax highlighting during reverse engineering.
As firebug is also Open Source, and I am currently looking at the possibilities of extending it to suit my needs, and make reverse engineering of javascript easier.