diff --git a/bin/codesign-for-instruments b/bin/codesign-for-instruments new file mode 100755 index 0000000..35c3d26 --- /dev/null +++ b/bin/codesign-for-instruments @@ -0,0 +1,14 @@ +#!/usr/bin/env zsh +# Re-sign a (Rust) binary to allow debuggers like Instruments to attach to it. +# Source: https://cocoaphony.micro.blog/2022/10/29/solving-required-kernel.html + +BIN=$1 + +exec codesign -s - -v -f --entitlements =(echo -n ' + + + + com.apple.security.get-task-allow + + +') "$BIN"