xcode的使用
# 快捷键
command+,: 呼出偏好设置, 终极奥义, 查看里面的key bindings即可知道有哪些快捷键option+点按: 查看选中符号的帮助提示(Quick Help for Selected Item)command+0: Show/Hide left tool panel(Navigator Area)command+L: 跳转到指定行shift+command+O: Open Quickly, 快速全局查找文件、符号, 非常常用!control+command+J: 跳转到指定符号的定义处或实现处(Go to Declaration/Definition)。有时工程正在 Loading、Indexing 或 Processing files 时, "command+点击"无法响应, 此时可试试 control+command+Jcontrol+command+↑/↓: 切换头文件/实现文件(switch between a source file (.m,.mm,.cc) and the associated header file(.h), Jump to Previous/Next Counterpart)control+command+←/→: go forward/backwardoption+command+←/→: 折叠当前代码块, 包括 @interface …@end 、 @implementation …@endcommand+[/]: 向前/向后缩进(Shift Left/Right)option+command+[/]: 将当前光标所在行代码上移/下移一行(Move Line Up/Down)control+6: 快速查看当前 class 的方法Command+Click: find callers (opens new window) via a context menu.command+shift+[/]: 在打开的 tab 之间移动Shift(⇧)+Command(⌘)+K: clean
# 其他
# attach debug process (opens new window)
Attaching to a Running Process
You can use Xcode to attach to, and debug, a program that is already running. You can attach to a program running under Xcode or to any process running on the current computer for which you have a process ID. To attach the debugger to a running process perform one of the following operations:
- Choose a program from the Debug > Attach menu. This menu lists currently running programs launched from Xcode, identified by the program name and the name of the corresponding Xcode project. (This menu also lists other programs running on the system.) To attach to one of these programs, choose it from the menu.
- To attach to any other running process, choose
Debug > Attach > Process ID. Enter the process ID of the process you want to attach to in the dialog that Xcode displays and press Return. - Click the Attach toolbar item in the Run Log window to attach to a program already running in Xcode. Xcode automatically displays this window when you launch a program in Xcode.
When you launch a program from Xcode, you can also have Xcode automatically attempt to attach the debugger to the process when the program crashes. To do so, select the executable for the program, open an inspector, and select the ?Auto-attach debugger on crash? option in the Debugging pane.
# file blame
for a git blame version click Editor->Author as it, sure it moved

# 查看派生类
采取全局搜索的方式 : xxx
# 链接
上次更新: 2024/12/01, 17:07:39