Customize Firebug shortcut keys

For a web developer, Firebug is indispensable for debugging javascript and CSS. Like any good debugger, it supports shortcut keys to control the execution (step in, step over, step out, and resume). Firebug’s keys (by default) are as follows:

  • F8 – Resume
  • F10 – Step Over
  • F11 – Step In
  • Shift-F11 – Step Out

However, these keys are not configurable. They may conflict with other shortcut keys in your system. They may not be the same as other keys you have already learned (eg, the keys in Eclipse). In my case, I found myself reaching for F5 – F8, which are the shortcut keys for Eclipse. Also, the Firebug keys conflict with the default Exposé keys in OS X. (Yes, I know I could change those shortcuts, but I’ve grown accustomed to their defaults.)

[ad]

So, I did some digging to see if it was possible to change the defaults for Firebug. I found this open ticket in their bug tracking system. It seems I’m not alone here.

I then did some digging to see how hard it would be to implement. It turns out, not too hard, as long as you don’t mind setting your shortcut keys by hacking around in about:config. It would be nicer to have a UI around this, but I’m content to stop here. Perhaps someone else can pick up where I left off and build a UI.

For now, the relevant about:config entries are:

  • extensions.firebug-service.shortcut_stepInto
  • extensions.firebug-service.shortcut_stepOver
  • extensions.firebug-service.shortcut_resume

For the Step Out feature, you still use Shift with the Step In key.

Here is the patch I made to add this functionality, as well as an XPI file if you are impatient and just want to download it now. I have also submitted this patch to the Firebug team, so hopefully this functionality will be added in the next (or soon) release. My work here was all based on the 1.2 branch, so it works with Firefox 3.0.

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments