Guides and Sample Code


Instruments User Guide

See Your App’s Source Code

If you have an Xcode project with the source code for the symbols listed in a stack trace, Instruments can display your code and can even open Xcode so that you can make any desired changes.

Use stack trace symbols to locate source code you have written. A user code stack trace symbol appears in the detail pane as a small square user icon with a black background. To make it easier to find symbols for your code, you can use the display settings area in the inspector pane to filter out hidden symbols and system libraries.

To see your app’s source code
  1. Find an icon for your code (denoted by a user (image: ../Art/inline_usercode_icon_2x.png) symbol) in either the detail pane or extended detail area of the inspector pane.

    image: ../Art/instruments_detail_pane_usersourcecode_2x.png
  2. Double-click the icon to display your source code where that symbol is used.

    image: ../Art/instruments_detail_pane_sourcecode_viewer_2x.png
  3. Click the Xcode button (image: ../Art/inline_xcode_2x.png) at the top right of the detail pane to open Xcode and display your source code. The following screenshot shows the location of the Xcode button that appears at the top of the detail pane. It appears there after you double-click a symbol or icon in the detail pane or the extended detail area of the inspector pane in order to display code in the detail pane.

    image: ../Art/instruments_detail_pane_sourcecode_viewer_xcode_button_2x.png