Allocations Instrument failed to attach to target process

When trying to use the Allocations Instrument I get the following error when pressing record:

Unable to issue sandbox extension for path: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DVTInstrumentsFoundation.framework/liboainject.dylib

Longer story: I can not get Xcode to launch a simulator with 15.5 so I downloaded the 15.2 runtime and created a simulator with that. Is there a step I missed downgrading to the older runtime? I'm trying to debug the 15.5 failure separately.

Replies

Same problem here

I had a similar problem trying to connect to a TVOS simulator with Instruments. When trying to connect with the regular run command (debug) in Xcode was working fine. I realized that the scheme I was using for profiling, had a (Profile) setting that was using Release, instead of Debug. Changing this to Debug, in manage schemes allowed instruments to attach. (This might have something to do with the GET_TASK_ALLOW entitlement, which I don't have set for this project in any target)