How to automatically set breakpoints on all methods in Xcode?

前端 未结 3 1615
时光取名叫无心
时光取名叫无心 2020-12-07 10:06

How do I automatically set breakpoints on all methods in Xcode? I want to know how my program works, and which methods invoke when I interact with the user interface.

3条回答
  •  北海茫月
    2020-12-07 10:34

    In some cases, it is more convenient to set breakpoints only on some of the methods.

    Using LLDB we can put breakpoint on all ViewDidLoad methods by name, for example.

    (lldb) breakpoint set -n ViewDidLoad
    

    Here "-n" means by name.

    Also, we can put breakpoints by selector name:

    (lldb) breakpoint set -S alignLeftEdges:
    

    Here "-S" means by selector.

提交回复
热议问题