There are generally three ways to explore the underlying principles of iOS to achieve real machine debugging

  1. Symbol breakpointDirectly follow process analysis
  2. throughPress control + step into
  3. assemblyProcess analysis

The following details how to find the source location of a method function using three methods, such as alloc

1.Symbol breakpointDirectly follow process analysis

• Break points through codealloc• Select breakpointsSymbolic Breakpoint • Symbol breakpoint inputalloc

allocIn thePersonBefore reaching this part of the breakpoint, you need to close the new one aboveallocSymbol breakpoint because there are so many calls to alloc that if turned on it will not be able to locate the Person’s alloc method exactly• Run the program to the Person breakpoint in Main to open the breakpoint and continue with discoverability

2, through thePress control + step into

• When the program runs to a breakpoint in person in the mian functionYou can findThe same goes for youallcoIs seen at the breakpoint of

Xcode ->Debug WorkFlow->Always Show Disassembly

Note (below is the source code provided by Apple download address) :

1.Apple all open source source summary address, find the corresponding source code according to the corresponding version, take MAC 10.15 as an example:MacOS --> 10.15 --> Select 10.15 --> Search objc

2,Apple more direct source download address, simply search for the source name you want to download, for exampleobjc:Directly search objc --> objC4 / --> select the corresponding version of ObjC