Questions tagged [xcode-instruments]

Instruments is a performance, analysis, and testing tool for dynamically tracing and profiling macOS, iOS, watchOS, and tvOS code.

Instruments is a performance, analysis, and testing tool for dynamically tracing and profiling macOS, iOS, tvOS, and watchOS code. It is a flexible and powerful tool that lets user track one or more processes and examine the collected data. In this way, Instruments helps user understand the behavior of both user apps and the operating system.

With Instruments, user use special tools to trace different aspects of a process’s behavior. Users can also use the tool to record a sequence of user interface actions and replay them, using one or more instruments to gather data.

Instruments includes the ability to:

  • Examine the behavior of one or more processes
  • Record a sequence of user actions and replay them, reliably reproducing those events and collecting data over multiple runs
  • Create own custom DTrace instruments to analyze aspects of system and app behavior
  • Save user interface recordings and instrument configurations as templates, accessible from Xcode

Using Instruments, user can:

  • Track down difficult-to-reproduce problems in code
  • Do performance analysis on app
  • Automate testing of app
  • Stress-test parts of app
  • Perform general system-level troubleshooting
  • Gain a deeper understanding of how app works

Instruments is available with Xcode 3.0 and later and with macOS 10.5 and later.

Source: About Instruments

406 questions
51
votes
1 answer

Instruments 4.1 unresponsive to projects launched from Xcode 4.1 until pressing Cmd-Tab

If I open Instruments and select a standard application (e.g. Mail or MS Word) it has no issue. If I am in Xcode and I go to Product > Profile (or press Cmd + I), it launches Instruments, allows me to select a template, and loads the standard…
James Paul Mason
  • 1,051
  • 1
  • 13
  • 27
40
votes
6 answers

My app freezes but no error appears

Does any body know what I have to check if my app freezes? I mean, I can see the app in the iPad screen but no buttons respond. I have tried debugging the code when I click on the button, but I haven't seen anything yet. I was reading about the…
Vanjo
  • 551
  • 1
  • 5
  • 9
36
votes
6 answers

iOS Crash without Error or Stack Trace

Having a hard time tracking down a crash in an iPad application. The difficulty really stems from the fact that there is no errors or stack trace present when the application fails. It simply goes away like Keiser Soze, "And like that, poof. He's…
MarkPowell
  • 16,482
  • 7
  • 61
  • 77
36
votes
6 answers

UICollectionview Scrolling choppy when loading cells

I have a gallery in my app utilizing a UICollectionView. The cells are approximately 70,70 size. I am using ALAssets from the ALAssetLibrary in the gallery which I have stored in a list. I am using the usual pattern for populating the…
Avba
  • 14,822
  • 20
  • 92
  • 192
34
votes
6 answers

Leaks Instrument not running in xcode 8.3.2

I have tried following the solution to this question. All instruments work perfectly but leak instruments cause this error: An error occurred trying to capture Leaks data, Error retrieving leak information. I want to be able to use Leak Instrument…
Vinod Kumar
  • 3,375
  • 1
  • 17
  • 35
28
votes
8 answers

Xcode 4 Instruments doesn't show source lines

I've just started playing with Xcode 4, and found that, no matter how I setup debugging symbols in the project, Instruments refuses to display source lines for stack trace items that correspond to my code. In only shows hex offsets and identifies my…
Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365
28
votes
3 answers

MacOSX Instruments to profile Python code

MacOSX Xcode Instruments is really great for profiling native code. However, I have also a huge chunk of Python calls in my callstacks. Can I somehow make Instruments Python-aware? One solution I could think of is when it sees some…
Albert
  • 65,406
  • 61
  • 242
  • 386
26
votes
4 answers

instruments with iOS: Why does Memory Monitor disagree with Allocations?

As can been seen in this screen shot from instruments, Allocations thinks my application (Ongo) is only using 7.55 MBs of memory, while Memory Monitor says 53.30. Further more the free system memory has little to no correlation to the amount of…
Brian
  • 772
  • 1
  • 13
  • 31
26
votes
2 answers

How to identify key events in Xcode Instruments?

There used to be a nice tool, DTSendSignalFlag, part of the DTPerformanceSession framework, by which you could programmatically insert flags into Instruments. (Xcode Instruments trace comparison explains how we used this macOS diagnostic tool in iOS…
Rob
  • 415,655
  • 72
  • 787
  • 1,044
25
votes
5 answers

Is it possible to run XCTest based tests under Instruments in Xcode 5?

Looking at XCTest and Xcode 5 unit testing and not seeing how to run my unit tests under Instruments in Xcode 5... Specifically I'd like to look for leaks during the test (this doesn't have to be automated in this instance, though clearly that'd be…
Dad
  • 6,388
  • 2
  • 28
  • 34
25
votes
5 answers

Launch a specific Hardware version of iOS simulator using instruments command line utility

I am using UIAutomation provided by Apple -> Xcode -> instruments. I have my Javascripts and the whole automation using instruments command line infrastructure running up. I got an additional task of running automation on previous versions of…
20
votes
2 answers

Xcode Instruments: Leaks - App crashes on launch

Xcode Instruments: Leaks - App crashes on launch The app crashes on both, a device and in a Simulator. What could cause the app to crash with the Instruments attached, while working correctly when installed using the cable or over the air via…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
18
votes
2 answers

How can iOS7 untethered energy/network recordings be accessed?

iOS7 has a preference under " Preferences | Developer | Instruments / Logging | Untethered Recording" to record the energy and network usage data. How do I extract this from the device to view in Xcode or Instruments?
Luke
  • 2,562
  • 1
  • 18
  • 35
17
votes
1 answer

Xcode Instruments, Leaks. Meaning of "thunk for @escaping @callee_guaranted() -> ()"

I often see this line in the Stack Trance when trying to track a memory leak in Xcode Instruments: thunk for @escaping @callee_guaranteed () -> () What does it mean? I can't even translate thunk word, not to mention its technical meaning in this…
kelin
  • 11,323
  • 6
  • 67
  • 104
17
votes
2 answers

Xcode 6 Memory Leaks Instrument doesn't work

I am trying to use Instruments to find leaks within my app. I do it in the same way as I did before updating to Xcode 6.x. Since updating, it won't take any snapshots: the leaks instrument status displays "Analyzing process" and will never…
spanfish
  • 191
  • 2
  • 5
1
2 3
27 28