Reputation: 379
Is there a way to see the order in which functions are called when we execute a program in Xcode? For instance, at runtime, if we press a button corresponding to a certain IBAction, can we see the order of method calls thereafter? I know the debugger is available, but it seems to be particularly useful when you know exactly what method calls you are looking for.
Any help would be much appreciated!
Upvotes: 0
Views: 794
Reputation: 180
Swift flows top to bottom. This is a good post on that. As well you can run a breakpoint, also added an explanation of a breakpoint. You can use them to stop and manually advance Xcode to the next thing to execute helps a lot with debugging.
You could also do print("Function x")
in each of the functions you have. This would then print them in order of execution time.
Upvotes: 1