Instrumentation (NS)
Before running Instruments 1, execute:
# Create NS "entitlement" for "task port" access, e.g. for debugger/profiler.
ENTITLEMENTS=entitlements.plist
cat > ${ENTITLEMENTS} << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
EOF
# Force-sign (-f) Emacs libraries and application with ad‐hoc identity (-s -).
codesign -s - -f --entitlements ${ENTITLEMENTS} \
nextstep/Emacs.app/Contents/MacOS/libexec/* \
nextstep/Emacs.app
# Quick-run Emacs, without loading any configuration.
emacs -Q
Footnotes:
1
To see standard output and error output, e.g. NSLog
, click “+ Instrument” and pick “stdout/stderr”.