Debug code in Share extension

Right now i'm trying to create a Share Extension for my application. Everything works fine except of breakpoints in ShareViewController (subclass of SLComposeServiceViewController).


Each and every breakpoint is not working. When i'm testing my extension in Photos or Safari app the actual share pop-up appears, but i can't make an app stop on breakpoints or even make it print logs.


But, when i'm running extension on the Simulator at least i can see output of my "print()" functions.


Have somebody witnessed same behaivior?

In my mind, not stopping at breakpoints makes sense.


The app you are testing it with was built in release mode and wouldn't support debugging.

I could also see that creating a potential security issue allowing debugging in that situation.


You might be able to use the system logging to help understand what is going on.


There is information on viewing the logs at

apple.stackexchange.com/questions/165100/how-to-read-iphone-system-logs


Documentation on logging is at

https://developer.apple.com/documentation/os/logging

Hi Serhii have you found a way to debug? Facing the same issue
Debug code in Share extension
 
 
Q