macos_debug.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Debugging on macOS
  2. ==================
  3. Debugging Godot editor
  4. ----------------------
  5. 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.
  6. If you want to debug an official build of the editor it should be re-signed with the proper entitlements.
  7. Create an ``editor.entitlements`` text file with the following contents:
  8. .. code-block:: xml
  9. <?xml version="1.0" encoding="UTF-8"?>
  10. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  11. <plist version="1.0">
  12. <dict>
  13. <key>com.apple.security.cs.allow-dyld-environment-variables</key>
  14. <true/>
  15. <key>com.apple.security.cs.allow-jit</key>
  16. <true/>
  17. <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
  18. <true/>
  19. <key>com.apple.security.cs.disable-executable-page-protection</key>
  20. <true/>
  21. <key>com.apple.security.cs.disable-library-validation</key>
  22. <true/>
  23. <key>com.apple.security.device.audio-input</key>
  24. <true/>
  25. <key>com.apple.security.device.camera</key>
  26. <true/>
  27. <key>com.apple.security.get-task-allow</key>
  28. <true/>
  29. </dict>
  30. </plist>
  31. Then use the following command to re-sign the editor::
  32. codesign -s - --deep --force --options=runtime --entitlements ./editor.entitlements ./path/to/Godot.app
  33. Debugging exported project
  34. --------------------------
  35. 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.