1

I'm connecting to my UNNotificationServiceExtension implementation by using Debug > Attach to Process by PID or Name (which took me forever to figure out), though when my breakpoints are hit and I try to po a variable, I get output like the following:

(lldb) po response      // `response` is a `NSURLResponse`, so I would expect it to be available to the debugger by way of `Foundation`.
warning: Swift error in module
MyExtensionProxy(0x00000001000e8000).
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module
MyExtension(0x0000000100118000).
Debug info from this module will be unavailable in the debugger.

error: in auto-import:
failed to get module 'MySharedFramework' from AST context
(lldb) 

I can't find any information on how to resolve these framework runtime errors, so debugging is just about impossible. How can I make these modules available in the debugger and be able to po my objects?

Hyperbole
  • 3,917
  • 4
  • 35
  • 54
  • Does this answer your question? [Debug Notification Extensions](https://stackoverflow.com/questions/38140158/debug-notification-extensions) – Igor Apr 29 '21 at 20:42

1 Answers1

2

Using Xcode 8.1

Was just going trough the same process myself. Gonna post this here for you and all the other searches. After eliminating all possibilities this small thing did the trick -

When you click "Debug > Attach to Process by PID or Name" you get this little popup window to insert your PID or Process Name. In this window there's a combo box titled "Toolchain". For me, it was set to "Xcode 8.1". Clicking this combo box opens more possibilities, among them was "Xcode 8.1 (Swift 2.3)". Picking this setting allowed me to see runtime variables in my Swift modules.