Guides and Sample Code

Developer

Instruments User Guide

On This Page

Menus and Keyboard Shortcuts

This chapter defines the different menus in Instruments, and provides their keyboard shortcuts, if applicable.

Instruments Menu

Command

Keyboard Shortcut

Description

About Instruments

Displays version and copyright information for Instruments.

Preferences

Command-Comma (,)

Opens the Preferences window.

Services

Allows you to trigger Instrument-related services and services from other apps, if enabled. Choose Services Preferences to open the Keyboard > Shortcuts > Services pane in System Preferences, where you can enable or disable services, and assign keyboard shortcuts to services.

Hide Instruments

Command-H

Hides all Instruments windows and menus.

Hide Others

Option-Command-H

Hides all apps except for Instruments.

Show All

Displays all currently running apps.

Quit Instruments

Command-Q

Closes all trace documents and shuts down Instruments, prompting you to save unsaved data in any opened trace documents.

File Menu

Command

Keyboard Shortcut

Description

New

Command-N

Creates a new trace document.

Open

Command-O

Opens a specified saved trace document.

Open Recent

Opens a recently saved trace document. Choose Clear Menu from this menu to remove all recently saved trace documents from the list.

Import Data

Opens the Import Trace dialog allowing you to load previously saved data. When loading data, you can choose an instrument to import the data. Options include Activity Monitor, Allocations, Counters, Leaks, Sampler, Time Profiler, Event Profiler, and VM Tracker.

Close

Command-W

Closes the selected trace document, prompting you to save any unsaved data.

Save

Command-S

Saves the selected trace document. Asks for a name and destination if this is the first time the trace document has been saved.

Save As

Shift-Command-S

Saves the selected trace document in a new designated location with a specified name.

Save As Template

Saves the current collection of instruments as a profiling template. Profiling templates can be accessed from the Instruments profiling template selection dialog. By default, templates are saved in ~/Library/Application Support/Instruments/Templates.

Record Trace

Command-R

Records trace data using the current instruments. While recording, this menu changes to Stop Trace, allowing you to stop the currently running trace.

Pause Trace

Shift-Command-R

Pauses a running trace.

Loop

Determines if the user interface recorder will loop during playback to repeat the recorded steps continuously.

Record Options

Option-Command-R

Opens the Record Options dialog, allowing you to specify the start delay, time limit, window limit, and whether data is collected in deferred mode.

DTrace Data Import

Allows you to import previously collected DTrace data.

DTrace Script Export

Allows you to export DTrace scripts.

Import Logged Data from Device

Allows you to import logs from an iOS device.

Symbols

Opens the symbolication dialog. Allows you to set the paths and files used when looking for symbols.

Edit Menu

Command

Keyboard Shortcut

Description

Undo

Command-Z

Removes previously performed actions.

Redo

Shift-Command-Z

Applies actions previously removed by Undo.

Cut

Command-X

Removes the selected content from the document.

Copy

Command-C

Copies the selected content to the Clipboard.

Deep Copy

Shift-Command-C

Copies the selected content and all of the items contained within it to the Clipboard.

Paste

Command-V

Pastes the content currently stored in the Clipboard into the selected document.

Paste and Match Style

Option-Shift-Command-V

Pastes the content currently stored in the Clipboard into the selected document and applies the document’s style information to the pasted data.

Delete

Deletes the selected content.

Select All

Command-A

Selects all available content.

Find

Find: Command-F

Find Next: Command-G

Find Previous: Shift-Command-G

Use Previous Selection for Find: Command-E

Jump to Selection: Command-J

Provides search options:

  • Find: Displays the search field and looks for the first instance of the input text.

  • Find Next: Displays the search field and looks for the next instance of the input text.

  • Find Previous: Displays the search field and looks for the previous instance of the input text.

  • Use Selection for Find: Displays the search field and uses the highlighted selection as the input.

  • Jump to Selection: Jumps to and highlights the current selection.

Spelling

Show Spelling and Grammar: Command-Colon (:)

Check Spelling: Command-Semicolon (;)

Provides spelling and grammar options for the document. Contains three suboptions:

  • Show Spelling and Grammar: Opens the Spelling and Grammar dialog.

  • Check Spelling: Performs a spell check on the active document.

  • Check Spelling While Typing: Continuously performs a spell check while typing in the active document.

Add Flag

Command–Down Arrow

Adds a new flag to the timeline pane.

Remove Flag

Command–Up Arrow

Removes an existing flag from the timeline pane.

Start Dictation

Allows you to dictate text content into a selected text field.

Emoji & Symbols

Control-Command-Space

Opens the Characters palette, which allows you to insert characters such as bullets, emoji, math symbols, and more.

View Menu

Command

Keyboard Shortcut

Description

Detail

Command-D

Opens and closes the detail pane.

Inspectors

Show Record Settings: Command-1

Show Display Settings: Command-2

Show Extended Detail: Command-3

Shows different inspectors in the detail pane. Contains three options:

  • Show Record Settings: Displays the record settings area in the inspector pane.

  • Show Display Settings: Displays the display settings area in the inspector pane.

  • Show Extended Detail Inspector: Displays the extended detail area in the inspector pane.

Full Screen

Command-Control-F

Toggles Instruments in and out of full screen mode.

Next Flag

Command–Right Arrow

Jumps to the next flag in the timeline pane.

Previous Flag

Command–Left Arrow

Jumps to the previous flag in the timeline pane.

Decrease Deck Size

Command-Dash (-)

Decreases the height of the selected instrument.

Increase Deck Size

Command-Plus (+)

Increases the height of the selected instrument.

Snap Track To Fit

Control-Command-Z

Resizes collected data so that it fits exactly inside of the timeline pane.

Clear Inspection Range

Command-Period (.)

Clears the current inspection range in the timeline pane.

Instrument Menu

Command

Keyboard Shortcut

Description

Build New Instrument

Command-B

Opens the Build Instrument dialog.

Edit <Instrument Name> Instrument

Opens the Build Instrument dialog filled with the selected instrument’s information.

Delete <Instrument Name> Instrument

After confirmation, removes the selected instrument from the trace document.

Delete Run <#>

After confirmation, deletes the selected data collection run from the trace document.

Trace Symbol

Command-T

Brings up the trace symbol dialog, which allows you to trace a specific symbol.

Previous Run

Command-Quote (")

Displays the run prior to the currently displayed run, if one exists.

Next Run

Command-Apostrophe (')

Displays the run after the currently displayed run, if one exists.

Export Track for <Instrument Name - Process>

Saves the collected information for the instrument/process combination listed.

Compare Call Trees

Compares the call tree of the current run with the call trees of previous runs.

Call Tree Data Mining

Allows you to manipulate the call tree in the detail pane by charging, pruning, and focusing.

Simulate Background Fetch

Allows you to initiate a simulated background fetch operation in order to see how your app responds. This menu is only visible and enabled while actively profiling an iOS app.

Simulate Memory Warning

Allows you to initiate a simulated memory warning in order to see how your app responds. This menu is only visible and enabled while actively profiling an iOS app.

Window Menu

Command

Keyboard Shortcut

Description

Minimize

Command-M

Minimizes the active Instruments window into the Dock.

Zoom

Control-Z

Enlarges the active Instruments window to the size of your video monitor while leaving the menu bar available.

Library

Command-L

Opens and closes the Library palette. This window displays a list of instruments, which you can drag and drop into your Instruments document.

Manage Flags

Shift-Command-T

Opens the Flags window, where you can edit flag information.

Bring All to Front

Brings all Instruments windows to the front of the screen.

<WindowName>

Makes the corresponding window active.