本文转载并参考至:http://stackoverflow.com/questions/33476432/is-there-a-workaround-for-dtrace-cannot-control-executables-signed-with-restri

在 OS X 10.11 El Capitan环境下,执行如下命令时会报错:

sudo dtruss /bin/ls

dtrace: failed to execute /bin/ls: dtrace cannot control executables signed with restricted entitlements


一个workaround就是把对应的binary拷贝到那些非“restricted"的位置,如/tmp

如下:

sudo dtruss /tmp/ls


试了一下,可以正常动作。