Hi all,
I can’t get the Xcode debugger to work on any of my juce projects, including those
I am on the latest versions of Catalina OS (10.15.2) and Xcode (11.3). Inserting breakpoints does not stop the program at all and on the left panel it is said “No debug session”.
What I am missing?
Did you choose an executable to launch from the “Edit Scheme…” option where you have the build targets in XCode?
in the window that pops up you need to set Executable
to some sort of host (a lightweight one will speed up your development, I tend to use Hosting AU when it’s just GUI stuff I want to debug, or Reaper when a proper DAW required), it will then be launched when you press the Play button (or Cmd-R)
Then add your plugin and you’ll hit any breakpoints (or the debugger will show you where you crashed if that’s what you’re trying to debug).
This took me far too long to work out when I started out on JUCE development.
Or alternatively connect the debugger to a running application:
Menu->Debug->Attach to Process->select your DAW running your plugin from the list
Many thanks! I can make it work with the Hosting AU but not with Ableton Live Suite 10 (latest version and updated): Xcode complains with this error:
Could not attach to pid : “28147”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: Error 1
–
Error 1
Domain: IDEDebugSessionErrorDomain
Code: 3
–
I searched online and this post https://forums.developer.apple.com/thread/120282 recommends to launch sudo DevToolsSecurity -enable
which did not solve the problem for me…
Has anybody met the same issue and knows how to solve it?
Cheers
This is because of hardened runtime (and its associated entitlements), which is required for notarization.
You can read from
or jump directly to a solution
Thanks a lot, it works
You are the real MVP!
Has anyone got plugin debugging with Ableton from XCode working on an M1 Mac running Monterey?
Every time I run this debug entitlement script:
The codesign fails for me with the related error output:
Re-applying entitlements (if missing)...
/Applications/Ableton Live 11 Suite.app: replacing existing signature
/Applications/Ableton Live 11 Suite.app: resource fork, Finder information, or similar detritus not allowed
codesign failed!
Just found the solution:
I had to run xattr -rc "/Applications/Ableton Live 11 Suite.app"
before running ./add_debug_entitlement.sh "/Applications/Ableton Live 11 Suite.app"
.
Solution from:
Thanks for this thread!
Just helped me out debugging in Ableton
Resurrecting this thread - I’ve had that script working fine for the last year or so, but now it tells me “Operation not permitted” (I tried with sudo as well)
Could something have changed in a recent macOS security update? I’m on Ventura 13.4
This is the output:
Grabbing entitlements from app...
Executable=/Applications/Ableton Live 11 Suite.app/Contents/MacOS/Live
Warning: Specifying ':' in the path is deprecated and will not work in a future release
Patch entitlements (if missing)...
Add: ":com.apple.security.cs.disable-library-validation" Entry Already Exists
Add: ":com.apple.security.cs.allow-unsigned-executable-memory" Entry Already Exists
Re-applying entitlements (if missing)...
/Applications/Ableton Live 11 Suite.app: replacing existing signature
/Applications/Ableton Live 11 Suite.app: Operation not permitted
codesign failed!
Removing temporary plist...
Hi,
We are experiencing the same issue…
“Operation not permitted” error. It used to work fine.
Did you find a fix for this?
Thnx!
This worked for me using an M3 chip on Sonoma for Ableton Lite 11. Thanks for the help!
Resurrecting this thread. Currently also getting
“Operation Not Permitted”
when trying to run
xattr -rc
Anyone find a way around this? I’m using Ableton 12 Suite on Mac OS Sequoia.
I was getting permission errors with the original script.
Hopefully this works i got it from the steinberg forum and some chatgpt but I confirm i can debug now. Not sure if you need a real developer id or just local developer ID is fine
% cat <<EOF > ~/Desktop/entitlements.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
EOF
THEN
% codesign --timestamp --options runtime --deep --force --sign "Developer ID Application: YOUR NAME (YOUR_DEVELOPER_ID)" --entitlements ~/Desktop/entitlements.plist \
"~/Desktop/Ableton Live 12 Lite.app"
Reviving this for anyone still looking for a solution…
I just opted to do a deep signature on everything included and not deal with entitlements and the library validation stuff (not sure if that’s needed for specific use cases, regular debugging in Ableton seems to work with this).
It takes a while to sign all the internal packages and libraries, but the following bash script parallelizes it, so it goes reasonably quick.
The Max.app bundle that’s contained in the Ableton bundle is excluded, so once you load any Max4Live devices in your newly signed Ableton, you’re probably going to get signature mismatch issues. Just remove it from exclusion if you want to sign Max and its internals too, but that will take a lot longer.
#!/bin/bash
# This script re-signs Ableton Live with a specified identity.
# Since all internal libraries should be signed with the same identity,
# we use parallel processing to speed up the signing process.
APP="/Applications/Ableton Live 11 Suite.app"
IDENTITY="Apple Development: Your Identity (XXXXXXXXXX)" #replace with your signing identity, assuming your certificate is on the keychain.
JOBS=$(sysctl -n hw.logicalcpu)
# Exclude the Max.app bundle
EXCLUDED_PATH="$APP/Contents/App-Resources/Max/Max.app"
# Find and sign Mach-O files, excluding Max.app
find "$APP" -type f -not -path "$EXCLUDED_PATH/*" -print0 | while IFS= read -r -d '' file; do
if file "$file" | grep -qE 'Mach-O.*(executable|dynamically linked shared library|bundle)'; then
printf '%s\0' "$file"
fi
done | xargs -0 -P "$JOBS" -n 1 -I {} codesign --force --sign "$IDENTITY" --timestamp=none "{}"
# Finally sign the main app bundle
echo "Signing main app bundle"
codesign --deep --force --sign "$IDENTITY" --timestamp=none "$APP"