34

How can I go step by step in Xcode while debugging with a keyboard shortcut? I'd like to make step over and step into with the keyboard, I've looked for keysheets and such but didn't find keys for that particular actions.

pkamb
  • 33,281
  • 23
  • 160
  • 191

3 Answers3

70

This is an easy one indeed. Go to Xcode>Preferences>Key Bindings and search for 'step'. There you can define your shortcuts for each action.

PS: As @Jenn noted below "Pause/Continue" is missing from this list, which is by default bound to ⌃⌘Y (ctrl + command + Y)

XCode Key Bindings

Juanes30
  • 2,398
  • 2
  • 24
  • 38
Alladinian
  • 34,483
  • 6
  • 89
  • 91
  • 10
    The "Continue program execution" is called "Pause / Continue" in the key bindings list (so you won't see it if you search for "step"). By default it is ⌃⌘Y (ctrl + command + Y) – Jenn Oct 16 '13 at 00:53
  • @Jenn Good observation, I'll amend accordingly. Thanx :) – Alladinian Oct 16 '13 at 07:33
  • 4
    You can enable the function buttons (F6,F7,F8...etc.) by going to `Mac System Preferences->Keyboard` and checking the box for `"Use all F1,F2,etc. keys as standard function keys"` – Drew H Mar 27 '14 at 05:11
19

See this cheat sheet about Xcode keyboard shortcuts:

UPDATE:

There are many good resources to know Xcode shortcut. I am listing some of here:

I know this is not the direct answer to the question. The Direct answer is already been give by Alladinian. But I think this answer is served as a good resource who is interested in Xcode shortcuts.

OLD ANSWER enter image description here

NOTE:

CRDave
  • 9,279
  • 5
  • 41
  • 59
  • This is nice, but barely readable. Do you have a link to the original image, or even better a PDF? – Cyrille Oct 06 '12 at 07:51
  • this image is already in good quality (2088 X 2160) just open it in new tab or open after save. – CRDave Oct 06 '12 at 07:59
  • Yup. It's just not clear, as it's not clickable. You should at least mention it in your answer, something like "original image is huge". Now it's done ;) – Cyrille Oct 06 '12 at 08:01
  • 3
    Here's a clearer version without jpeg compression artifacts: http://www.1729.us/xcode/Xcode%20Shortcuts.png – Dermot Feb 14 '13 at 03:39
  • @Dermot Thanks for this improvement. – CRDave Feb 14 '13 at 05:38
  • This does not answer the question, the default shortcuts for step over (F6) and step into (F7) are not in this cheatsheet. – Marián Černý Oct 03 '13 at 13:05
  • It would be nice to see an updated version of this for the current default key bindings. Even I stopped mapping XCode to these old keys eventually... – Echelon Mar 12 '14 at 16:19
  • @Echelon Thanks to point out me to update. Original author update it for Xcode 4 so I put that updated version. He also make it public on Github so if someone want to make it more up to date he can help there. – CRDave Mar 13 '14 at 04:57
4

Apples website has an easy to read list:

https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/xcode_help-command_shortcuts/MenuCommands/MenuCommands014.html

Specifically F6 to step over and F7 to step into are the ones I use the most.

Adam Knights
  • 2,141
  • 1
  • 25
  • 48