Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

anyway to see method execution times in Xcode?

I need to debug a certain ViewController I have and I can't seem to pinpoint exactly what is causing my lag time for the view to show.

IS there any debugger tool in Xcode that will show me how long my methods are taking to run so i can at least find the right place to start?

like image 364
Slee Avatar asked Dec 30 '10 13:12

Slee


People also ask

Does Xcode have a debugger?

The Xcode debugger provides several methods to step through your code and inspect variables. You can precisely control execution of your code from a breakpoint, stepping into and out of called functions as necessary to determine where your bug occurs.

What is Xcode debugger?

Xcode 9 added support for wireless debugging. This means that you can build and run your application on a physical device without the need for a wire. That's great and it means that developers can also attach the debugger to an application that's running on a device.


1 Answers

Instruments has a profiler built into it ever since iOS 4.0 (before which you used a stand-alone profiler tool called Shark).

Here's a quick little tutorial that will get you started: http://blancer.com/tutorials/flex/78335/apple-profiling-tools-shark-is-out-instruments-is-in/

If you don't know about Instruments, you should. It's how you know what's really going on inside your code while it runs.

like image 62
Dan Ray Avatar answered Oct 26 '22 23:10

Dan Ray