How to reliably debug PHBackgroundResourceUploadExtension during development?

I'm developing a PHBackgroundResourceUploadExtension and finding it difficult to debug because the system controls when the extension launches.

Current experience:

  • The extension starts at unpredictable times (anywhere from 1 minute to several hours after photos are added)
  • By the time I attach the debugger, the upload may have already completed or failed
  • Breakpoints in init() or early lifecycle methods are often missed

Questions:

  1. Is there a way to force-launch the extension during development (similar to how we can manually trigger Background App Refresh in Xcode)?
  2. Are there any launch arguments or environment variables that put the extension in a debug/eager mode?

I tried taking photos/videos, but this doesn't trigged app extension in all cases.

Any tips for improving the debug cycle would be greatly appreciated.

Environment: iOS 26, Xcode 18

How to reliably debug PHBackgroundResourceUploadExtension during development?
 
 
Q