Attach to process from Xcode 7

I am running Xcode 7 in OS 10.11.


Wanna attach to a process and debug from Xcode 7. But that doesn't seem to work.

  • Say, open "Notes" app
  • From Xcode 7, go to "Debug > Attach to Process". Pick "Notes" from the menu.


Xcode debug console shows: "error: failed to attach to process ID 270"


Console app shows a bunch of sandbox error. Sth like "debugserver (470) System Policy: deny mach-priv-task-port"



Is this a regression? Or a new code signing behavior? (I am pretty sure I can do so in Yosemite with Xcode 6)


Please advice.


Thanks

Bill

Replies

This results from the system integrity protection feature. See WWDC 2015 Session 706 Security and Your Apps.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

So attaching debugger to osx apps is no longer possible?

So attaching debugger to osx apps is no longer possible?

Did you watch the session I referenced? WWDC week is a bit of a blur for me, so I'd rather you get the answer first hand than rely on my sleep-deprived memories (-:

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Bump. A sleep-deprived memory would at least give some insight. I don't have time to watch an hour long video for the answer.


Thanks!

jvallely wrote:

Bump.

I presume you’re specifically referring to this question from Anrock:

So attaching debugger to osx apps is no longer possible?

By default:

  • you can’t attached to a process running a protected executable

  • you can attach to other processes

You can change this default by disabling SIP, which you can do by booting from the restore partition.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"