How to enable debugging of protected DAWs

Do you need to debug your plugin in a DAW but you can not attach XCode debugger. Well, there is this script. Just run:

chmod a+x 
./ /Applications/Ableton\ Live\ 11.3\

The script ( Apple documentation ):

#! /bin/bash
# Simple Utility Script for allowing debug of hardened macOS apps.
# This is useful mostly for plug-in developer that would like keep developing without turning SIP off.
# Credit for idea goes to (McMartin):
# Update 2022-03-10: Based on Fabian's feedback, add capability to inject DYLD for sanitizers.
# Please note:
# - Modern Logic (on M1s) uses `AUHostingService` which resides within the system thus not patchable and REQUIRES to turn-off SIP.
# - Some hosts uses separate plug-in scanning or sandboxing. 
#     if that's the case, it's required to patch those (if needed) and attach debugger to them instead.
# If you see `operation not permitted`, make sure the calling process has Full Disk Access.
# For example is showing and has Full Disk Access under System Preferences -> Privacy & Security

if [ -z "$app_path" ];
    echo "You need to specify app to re-codesign!"
    exit 0

# This uses local codesign. so it'll be valid ONLY on the machine you've re-signed with.
echo "Grabbing entitlements from app..."
codesign -d --entitlements - "$app_path" --xml >> $entitlements_plist || { exit 1; }
echo "Patch entitlements (if missing)..."
/usr/libexec/PlistBuddy -c "Add bool true" $entitlements_plist
/usr/libexec/PlistBuddy -c "Add bool true" $entitlements_plist
/usr/libexec/PlistBuddy -c "Add bool true" $entitlements_plist
# allow custom dyld for sanitizers...
/usr/libexec/PlistBuddy -c "Add bool true" $entitlements_plist
echo "Re-applying entitlements (if missing)..."
codesign --force --options runtime --sign - --entitlements $entitlements_plist "$app_path" || { echo "codesign failed!"; }
echo "Removing temporary plist..."
rm $entitlements_plist

1 2 3 4 6