Closed Bug 775050 Opened 9 years ago Closed 9 years ago

Add keyboard shortcuts for stepping

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 17

People

(Reporter: past, Assigned: vporof)

References

Details

Attachments

(1 file, 2 obsolete files)

Stepping is something that is commonly done in a debugger session, and clicking the button a lot of times consecutively is not uncommon. We should add a keyboard shortcut to help with this workflow and perhaps only enable it when the debugger UI has the focus.
F7, F8 and F9?
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Priority: -- → P2
I think the more generally accepted shortcuts are:
F8: pause/resume
F10: step over
F11: step in
shift+F11: step out
Priority: P2 → --
...however, on OS X, F11 and shift+F11 makes all open windows dance, grab a partner and retract to the corners of the screen.
Attached patch v1 (obsolete) — Splinter Review
Attachment #644268 - Flags: review?(rcampbell)
Blocks: 770193
Priority: -- → P2
Comment on attachment 644268 [details] [diff] [review]
v1

+  <keyset id="threadStateKeys">
+    <key keycode="VK_F8"
+         oncommand="DebuggerView.StackFrames._onResume()"/>
+    <key keycode="VK_F9"
+         oncommand="DebuggerView.StackFrames._onStepOver()"/>
+    <key keycode="VK_F10"
+         oncommand="DebuggerView.StackFrames._onStepIn()"/>
+    <key keycode="VK_F10" modifiers="shift"
+         oncommand="DebuggerView.StackFrames._onStepOut()"/>
+  </keyset>

my original suggestion was to use F7, 8 and 9 for the greedy purpose of not requiring mac users to rewire most of their exposé buttons.

Defaults of F8, 9, 10, and 11 on all Macs are Spaces, Expose (all), Expose (app) and Show Desktop are going to be annoying for people to change.

Can we do something different for Mac? Should we? These key commands are too important to screw up, and a heavy debug user is likely to want to have those keys available, maybe even enough to change their expose settings.
(In reply to Rob Campbell [:rc] (:robcee) from comment #5)
> Comment on attachment 644268 [details] [diff] [review]
> v1
> 
> +  <keyset id="threadStateKeys">
> +    <key keycode="VK_F8"
> +         oncommand="DebuggerView.StackFrames._onResume()"/>
> +    <key keycode="VK_F9"
> +         oncommand="DebuggerView.StackFrames._onStepOver()"/>
> +    <key keycode="VK_F10"
> +         oncommand="DebuggerView.StackFrames._onStepIn()"/>
> +    <key keycode="VK_F10" modifiers="shift"
> +         oncommand="DebuggerView.StackFrames._onStepOut()"/>
> +  </keyset>
> 
> my original suggestion was to use F7, 8 and 9 for the greedy purpose of not
> requiring mac users to rewire most of their exposé buttons.
> 
> Defaults of F8, 9, 10, and 11 on all Macs are Spaces, Expose (all), Expose
> (app) and Show Desktop are going to be annoying for people to change.
> 
> Can we do something different for Mac? Should we? These key commands are too
> important to screw up, and a heavy debug user is likely to want to have
> those keys available, maybe even enough to change their expose settings.

Let's use two sets of commands, and keep the de facto keys F8, F10, F11, shift+F11.
And maybe do something (ugly) like meta+semicolon+comma or something. I'll search for the most commonly used alternatives on OS X.
Xcode: F6 (Step over) F7 (Step into), F8 (Step out)
Chrome: ⌘/ (Pause/Continue) ⌘' (Step over) ⌘; (Step into) ⇧⌘; (Step out)
F11 also makes Firefox fullscreen.
Firebug: Play is F8, Step Over F10, Step into F11, Step Out Shift F11
(In reply to Rob Campbell [:rc] (:robcee) from comment #9)
> Firebug: Play is F8, Step Over F10, Step into F11, Step Out Shift F11

Yeah, the most commonly used ones.
I vote: use those on Windows, and F6, 7, 8 on OS X.
+1 for the chrome bindings. Faster to access these keys then moving up to F6-F8.
(In reply to Victor Porof [:vp] from comment #10)
> (In reply to Rob Campbell [:rc] (:robcee) from comment #9)
> > Firebug: Play is F8, Step Over F10, Step into F11, Step Out Shift F11
> 
> Yeah, the most commonly used ones.
> I vote: use those on Windows, and F6, 7, 8 on OS X.

ok, let's do that.
(In reply to Julian Viereck from comment #11)
> +1 for the chrome bindings. Faster to access these keys then moving up to
> F6-F8.

Hmm, we can't and shouldn't use those, because of localization issues.
Attached patch v2 (obsolete) — Splinter Review
Attachment #644268 - Attachment is obsolete: true
Attachment #644268 - Flags: review?(rcampbell)
Attachment #646515 - Flags: review?(rcampbell)
Comment on attachment 646515 [details] [diff] [review]
v2

+#ifdef XP_MACOSX
+         key="Y" modifiers="control shift"
+#else
+         keycode="VK_F8"
+#endif
+         oncommand="DebuggerView.StackFrames._onResume()"/>

Y? Where'd that come from?

I thought F6 for continue...
(In reply to Victor Porof [:vp] from comment #13)
> (In reply to Julian Viereck from comment #11)
> > +1 for the chrome bindings. Faster to access these keys then moving up to
> > F6-F8.
> 
> Hmm, we can't and shouldn't use those, because of localization issues.

what localization issues?
Attachment #646515 - Flags: review?(rcampbell)
(In reply to Rob Campbell [:rc] (:robcee) from comment #16)
> (In reply to Victor Porof [:vp] from comment #13)
> > (In reply to Julian Viereck from comment #11)
> > > +1 for the chrome bindings. Faster to access these keys then moving up to
> > > F6-F8.
> > 
> > Hmm, we can't and shouldn't use those, because of localization issues.
> 
> what localization issues?

Does ⌘' sound like a good idea?
(In reply to Rob Campbell [:rc] (:robcee) from comment #15)
> Comment on attachment 646515 [details] [diff] [review]
> v2
> 
> +#ifdef XP_MACOSX
> +         key="Y" modifiers="control shift"
> +#else
> +         keycode="VK_F8"
> +#endif
> +         oncommand="DebuggerView.StackFrames._onResume()"/>
> 
> Y? Where'd that come from?
> 
> I thought F6 for continue...

F6 is step over, and we said we should reuse the Xcode key bindings.
F7 step in, F8 step out, and control+shift+Y is continue (in Xcode). I think this is what mac users should be familiar with (although I wasn't).
(In reply to Victor Porof [:vp] from comment #17)
> (In reply to Rob Campbell [:rc] (:robcee) from comment #16)
> > (In reply to Victor Porof [:vp] from comment #13)
> > > (In reply to Julian Viereck from comment #11)
> > > > +1 for the chrome bindings. Faster to access these keys then moving up to
> > > > F6-F8.
> > > 
> > > Hmm, we can't and shouldn't use those, because of localization issues.
> > 
> > what localization issues?
> 
> Does ⌘' sound like a good idea?

no.

(In reply to Victor Porof [:vp] from comment #18)
> (In reply to Rob Campbell [:rc] (:robcee) from comment #15)
> > Comment on attachment 646515 [details] [diff] [review]
> > v2
> > 
> > +#ifdef XP_MACOSX
> > +         key="Y" modifiers="control shift"
> > +#else
> > +         keycode="VK_F8"
> > +#endif
> > +         oncommand="DebuggerView.StackFrames._onResume()"/>
> > 
> > Y? Where'd that come from?
> > 
> > I thought F6 for continue...
> 
> F6 is step over, and we said we should reuse the Xcode key bindings.
> F7 step in, F8 step out, and control+shift+Y is continue (in Xcode). I think
> this is what mac users should be familiar with (although I wasn't).

yeah, I am not sold on those at all.

I want F6 for Continue, F7 for step in F8 for step out and shift F8 for step out. I think we should just do that on all platforms.
(In reply to Rob Campbell [:rc] (:robcee) from comment #16)
> (In reply to Victor Porof [:vp] from comment #13)
> > (In reply to Julian Viereck from comment #11)
> > > +1 for the chrome bindings. Faster to access these keys then moving up to
> > > F6-F8.
> > 
> > Hmm, we can't and shouldn't use those, because of localization issues.
> 
> what localization issues?discovered that F

IIRC, many keyboards in other locales have remapped some of those characters to keys far away, or require additional modifiers.

I think I like Rob's picks the most, but I just discovered that F6 focuses the awesome bar and F7 turns Caret Browsing on. Dunno how important those are...
(In reply to Panos Astithas [:past] from comment #20)
> (In reply to Rob Campbell [:rc] (:robcee) from comment #16)
> > (In reply to Victor Porof [:vp] from comment #13)
> > > (In reply to Julian Viereck from comment #11)
> > > > +1 for the chrome bindings. Faster to access these keys then moving up to
> > > > F6-F8.
> > > 
> > > Hmm, we can't and shouldn't use those, because of localization issues.
> > 
> > what localization issues?discovered that F
> 
> IIRC, many keyboards in other locales have remapped some of those characters
> to keys far away, or require additional modifiers.
> 
> I think I like Rob's picks the most, but I just discovered that F6 focuses
> the awesome bar and F7 turns Caret Browsing on. Dunno how important those
> are...

We're safe as long as the Debugger has focus. Ok, I'll use F6, 7, 8 for all platforms.
Attached patch v3Splinter Review
Third time the charm.
Attachment #646515 - Attachment is obsolete: true
Attachment #648074 - Flags: review?(rcampbell)
Attachment #648074 - Flags: review?(rcampbell) → review+
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/e4359dbd754c
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/e4359dbd754c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 17
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.