Debugging on macOS

Debugging Godot editor

Attaching a debugger to the signed macOS process requires the “com.apple.security.get-task-allow” entitlement, which is not enabled by default, since apps can’t be notarized as long as it is enabled. If you want to debug an official build of the editor it should be re-signed with the proper entitlements.

Create an editor.entitlements text file with the following contents:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3. <plist version="1.0">
  4. <dict>
  5. <key>com.apple.security.cs.allow-dyld-environment-variables</key>
  6. <true/>
  7. <key>com.apple.security.cs.allow-jit</key>
  8. <true/>
  9. <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
  10. <true/>
  11. <key>com.apple.security.cs.disable-executable-page-protection</key>
  12. <true/>
  13. <key>com.apple.security.cs.disable-library-validation</key>
  14. <true/>
  15. <key>com.apple.security.device.audio-input</key>
  16. <true/>
  17. <key>com.apple.security.device.camera</key>
  18. <true/>
  19. <key>com.apple.security.get-task-allow</key>
  20. <true/>
  21. </dict>
  22. </plist>

Then use the following command to re-sign the editor:

  1. codesign -s - --deep --force --options=runtime --entitlements ./editor.entitlements ./path/to/Godot.app

Debugging exported project

To allow debugging, select the codesign\debugging (com.apple.security.get-task-allow) entitlement during the export. When it is selected, notarization is not supported and should be disabled.

Previous Next


© Copyright 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision 53e837c6.

Built with Sphinx using a theme provided by Read the Docs.