Last Comment Bug 775050 - Add keyboard shortcuts for stepping
: Add keyboard shortcuts for stepping
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: Firefox 17
Assigned To: Victor Porof [:vporof][:vp]
:
Mentors:
Depends on:
Blocks: 770193
  Show dependency treegraph
 
Reported: 2012-07-18 04:44 PDT by Panos Astithas [:past]
Modified: 2012-08-02 04:21 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (6.19 KB, patch)
2012-07-20 05:39 PDT, Victor Porof [:vporof][:vp]
no flags Details | Diff | Splinter Review
v2 (6.18 KB, patch)
2012-07-27 04:23 PDT, Victor Porof [:vporof][:vp]
no flags Details | Diff | Splinter Review
v3 (5.89 KB, patch)
2012-08-01 14:08 PDT, Victor Porof [:vporof][:vp]
rcampbell: review+
Details | Diff | Splinter Review

Description Panos Astithas [:past] 2012-07-18 04:44:06 PDT
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.
Comment 1 Rob Campbell [:rc] (:robcee) 2012-07-19 12:32:14 PDT
F7, F8 and F9?
Comment 2 Victor Porof [:vporof][:vp] 2012-07-20 05:28:37 PDT
I think the more generally accepted shortcuts are:
F8: pause/resume
F10: step over
F11: step in
shift+F11: step out
Comment 3 Victor Porof [:vporof][:vp] 2012-07-20 05:36:35 PDT
...however, on OS X, F11 and shift+F11 makes all open windows dance, grab a partner and retract to the corners of the screen.
Comment 4 Victor Porof [:vporof][:vp] 2012-07-20 05:39:21 PDT
Created attachment 644268 [details] [diff] [review]
v1
Comment 5 Rob Campbell [:rc] (:robcee) 2012-07-26 10:37:24 PDT
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.
Comment 6 Victor Porof [:vporof][:vp] 2012-07-26 10:44:52 PDT
(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.
Comment 7 Victor Porof [:vporof][:vp] 2012-07-26 10:56:31 PDT
Xcode: F6 (Step over) F7 (Step into), F8 (Step out)
Chrome: ⌘/ (Pause/Continue) ⌘' (Step over) ⌘; (Step into) ⇧⌘; (Step out)
Comment 8 Thaddee Tyl [:espadrine] 2012-07-26 11:17:45 PDT
F11 also makes Firefox fullscreen.
Comment 9 Rob Campbell [:rc] (:robcee) 2012-07-26 11:20:25 PDT
Firebug: Play is F8, Step Over F10, Step into F11, Step Out Shift F11
Comment 10 Victor Porof [:vporof][:vp] 2012-07-26 12:17:49 PDT
(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.
Comment 11 Julian Viereck 2012-07-26 13:05:49 PDT
+1 for the chrome bindings. Faster to access these keys then moving up to F6-F8.
Comment 12 Rob Campbell [:rc] (:robcee) 2012-07-26 13:25:33 PDT
(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.
Comment 13 Victor Porof [:vporof][:vp] 2012-07-27 04:02:53 PDT
(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.
Comment 14 Victor Porof [:vporof][:vp] 2012-07-27 04:23:02 PDT
Created attachment 646515 [details] [diff] [review]
v2
Comment 15 Rob Campbell [:rc] (:robcee) 2012-07-30 07:39:36 PDT
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...
Comment 16 Rob Campbell [:rc] (:robcee) 2012-07-30 07:39:59 PDT
(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?
Comment 17 Victor Porof [:vporof][:vp] 2012-07-30 23:09:11 PDT
(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?
Comment 18 Victor Porof [:vporof][:vp] 2012-07-30 23:11:48 PDT
(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).
Comment 19 Rob Campbell [:rc] (:robcee) 2012-07-31 10:49:50 PDT
(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.
Comment 20 Panos Astithas [:past] 2012-08-01 03:21:40 PDT
(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...
Comment 21 Victor Porof [:vporof][:vp] 2012-08-01 08:58:54 PDT
(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.
Comment 22 Victor Porof [:vporof][:vp] 2012-08-01 14:08:57 PDT
Created attachment 648074 [details] [diff] [review]
v3

Third time the charm.
Comment 23 Victor Porof [:vporof][:vp] 2012-08-02 00:50:12 PDT
https://hg.mozilla.org/integration/fx-team/rev/e4359dbd754c
Comment 24 Tim Taubert [:ttaubert] (on PTO, back Aug 29th) 2012-08-02 04:21:57 PDT
https://hg.mozilla.org/mozilla-central/rev/e4359dbd754c

Note You need to log in before you can comment on or make changes to this bug.