Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change firefox developer tools debugger key bindings

How can you change the firefox debugger's step in, step over, step out key bindings?

Couldn't find any docs on this nor anything in about:config.

like image 428
simonzack Avatar asked Nov 10 '22 21:11

simonzack


1 Answers

In case it helps someone...

This solution only works on Windows though, since it's a Autohotkey script.

It changes the keys so:

F7 -> "Step in"
F8 -> "Step over"
F9 -> "Run"
F10 -> "Step out"

#WinActivateForce
#InstallKeybdHook
#Persistent
#HotkeyInterval,100
#NoEnv
SetKeyDelay, –1
SendMode Input

$F7:: 
{
    if WinActive("ahk_classMozillaWindowClass")
    {  
        Send {F11}
        Return
    }
    Send {F7}
    Return
}

$F8:: 
{
    if WinActive("ahk_classMozillaWindowClass")
    {  
        Send {F10}
        Return
    }
    Send {F8}
    Return
}

$F9:: 
{
    if WinActive("ahk_classMozillaWindowClass")
    {  
        Send {F8}
        Return
    }
    Send {F9}
    Return
}

$F10:: 
{
    if WinActive("ahk_classMozillaWindowClass")
    {  
        Send {Shift down}{F11}{Shift up}
        Return
    }
    Send {F10}
    Return
}

I'm pretty sure this can be improved (I'm not an Autohotkey expert). For example, the F7, F8, F9 and F10 keys will be changed everywhere in Firefox, not simply when you're debugging!

I'm interested if someone has improvements to suggest.

like image 131
electrotype Avatar answered Dec 01 '22 13:12

electrotype