Transfer from http://ixhan.com/2011/12/high-efficiency-xcode/
Monday took part in IOS Tech talk bejing a session that demonstrated a way to speed up debug efficiency and felt very good. Here also share my common skills to improve the efficiency of everyone
Basic article
- Control +command + arrow Up/down Toggles the current file header file and implementation file
- CONTROL + COMMAND + arrow left/right Toggle History/Next File
- Command B/R compile/run
- Command + Left click on Word can jump in the declaration/implementation of a method, the definition of a variable, the definition of a class
- Option + Left click on Word quick help for current content
- SHIFT + COMMAND + Y displays the debug workspace
- Command + f/option + COMMAND + F search/replace (after search command + G can jump to the next result)
- SHIFT + COMMAND + F is a global search, very convenient
- (ESC) Auto-complete menu
PS. There are also several OSX system-wide commands that are also very efficient.
- Option + arrow left/right to move the cursor in the word unit
- Command + arrow left/right move cursor to wardrobe, end of line
Advanced article
- SHIFT + COMMAND + O Quick position file
- SHIFT + COMMAND + J Displays the current file in the Project Navigator (especially useful in large projects, recommended!)
- OPTION + Click the file in the Project Navigator can open the file in the auxiliary editor, it is convenient to view multiple source files at the same time (the default auxiliary editor function is very weak, so that the basic can retrieve the Xcode3 split screen function)
- Command + L is set to the specified line to the file
- SHIFT + Command +L jumps to the cursor position (of course I prefer to point down arrows to locate)
- Control + I reformat the selected text indent
Debug article
XCODE4 when the IDE is enabled, the debugger sometimes becomes very annoying, please continue to look down. (This content learns to iOS Tech talk!)
- Create a new tab (CMD + t) and double-click the tab name to modify the CONSOLE #不知道tab可以改名吧! The experience of the weak explosion
- Adjust the CONSOLE tab for your favorite debugging appearance, I like to have a big log window (SHIFT+CMD+C), the left side of the debug bar, do not display the right column, leave a little space for the editor, convenient breakpoint when tracking, the final effect of the drawings
- You can turn the Console tab off (Xcode automatically remembers the tab setting, so you should know that you often have a log window at the time of debugging and sometimes you need to open it yourself)
- Open behavior this option in Settings
- Select Run start, only tick
show tab CONSOLE
andshow navigator Debug
- Turn off the options in run complete. # so the debug is over we can continue to look at log, not the default log is also closed
- Finish, Run! If you have multiple screens, you can also drag the Console tab out of place for better results!
Xcode shortcut keys