What mechanisms prevent me from “ptraceing” a signed OSX application?

I want to debug an application I have installed on my Mac.

The application comes in a “.app” format, which is basically a folder including the binary and some other frameworks and resources.

I was trying to attach to the process using ptrace(), but it seems that I get blocked by doing so (even while running as root).

I am able to debug other apps (which I compiled myself).

I was wondering what mechanism is stopping me from doing so, and, is there is any way to bypass it.

Thanks!