Reputation: 3603
I'm building a simple iOS app to retrieve some json data and display annotations in a MKMapView.
I get freezes at launch and I'd like to debug it and I was wondering if it's possible to see in real time what functions are called on device with Xcode in order to see where hangs occur.
Upvotes: 0
Views: 170
Reputation: 1979
Simple solution: add NSLog
to your methods and look at the timestamps. You can add one at the top of your method and one at the bottom to see how long that method takes to execute.
More advanced and powerful: Time Profiling in Instruments. How to Use Instruments in Xcode
Upvotes: 1
Reputation: 9397
Just hit pause in Xcode's debugger, and if your main thread is blocked, it should show you a meaningful stack trace.
Upvotes: 2