I made a new command-line tool C++ project in Xcode, with the following main.cpp:
#include <iostream>
int main() {
std::cout << "Hello, World!\n";
}
When I try to profile it in Instruments with any template, I get the following error before my program even starts:
Failed to execute loader thread for /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib in target; target process <pid> likely exited
I get the same error when I try running Instruments with xctrace.
How do I get Instruments to properly load my programs?
Setup:
- Xcode version: 13.4.1 (13F100)
- Hardware: 2020 M1 MacBook Air