My friend and co-worker Panos Astithas was in town the other day, and so we decided to hack together on some features that we wouldn't normally be working on in our regular day-to-day. Among them was a new evaluation feature for the Firefox Developer Tools' Scratchpad that allows you to evaluate individual top level functions at a time. The command is bound to the Cmd + E keyboard shortcut and was inspired by SLIME's slime-compile-defun (C-c C-c) command.

Being able to re-evaluate individual functions at a time enables faster prototyping. The previous workflow whenever you wanted to edit functions was to refresh the app, repeat interactions that put the app back into the previous state, and then finally observe how your changes affected the app. In many cases, you can avoid this lengthy process by editing your code in the Scratchpad and using Cmd + E to re-evaluate individual functions. Re-evaluating individual functions doesn't refresh the app, and lets it maintain its existing state. No refreshing or repeated interactions required.

When you re-evaluate a function with Cmd + E, we flash the function's source text briefly to provide some visual feedback.

This feature is available in Firefox 28, which is currently in the Nightly release channel.