Xcode - How to profile an application as root?
Asked Answered
P

1

8

Xcode will allow me to run my application as root (the "Debug Process As" option in the scheme allows you to select "Me" or "root"). How can I run it through the profiler as root?

I'm using Xcode 4.6.3.

Peptize answered 27/1, 2014 at 22:39 Comment(5)
What version of Xcode?Hyades
I don't think you can, unless you run Instruments as root (i.e. sudo open /Path/To/Instruments.app) and attach to the process.Hyades
Thanks; running Instruments as root worked. (I had to do sudo /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments instead of open though)Peptize
If you found a way to to do it, it would be helpful if you write it up as an answer.Alasteir
@KristopherJohnson I added an answerPeptize
P
8

The solution is to run Instruments as root and attach to the process.

To run Instruments as root:

sudo /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Ins‌​truments
Peptize answered 16/11, 2015 at 21:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.