use instruments - leaks with a device

Sefran2 picture Sefran2 · Dec 1, 2010 · Viewed 14k times · Source

I'm starting to use Instruments-Leaks with an iPhone 3G. When I try to run the app with Instruments on the iPhone I obtain

Target failed to run: Remote exception encountered: 'Failed to get task for pid 280'

Ideas?

The only time I succeed in running the app with instruments it run very slow, I couldn't test it. What are the steps to run the app on the device searching for leaks?

Answer

Peter Johnson picture Peter Johnson · Mar 28, 2011

The solution for me was to make sure that my Profile scheme was using the "debug" and not "release" build configuration.

In Xcode 4 select Product/Edit Scheme from the top menu then click on the "profile" button on the left. On the "info" pane you will see a setting for Build Configuration- set that to "debug"