Xcode debugger: cmd line application - start with sudo?
Running XCode as root is a bad idea.
There is an option for this in XCode (6.2):
- Product -> Scheme -> Edit Scheme
- Select the "Run" configuration
- Change the radio button for "Debug Process As" to "root"
Have you tried starting Xcode with sudo?
The processes it spawns (gdb,...) should also run with superuser privileges:
sudo /Applications/Xcode.app/Contents/MacOS/Xcode