How to debug ios share extension?

Bartłomiej Semańczyk picture Bartłomiej Semańczyk · Nov 4, 2015 · Viewed 8.7k times · Source

How to print logs in Xcode's lldb debugger from extension?

Answer

Bartłomiej Semańczyk picture Bartłomiej Semańczyk · Nov 5, 2015

Simple answer:

  • log messages are not printed, however you can stop at breakpoints, and then print everything using lldb.

    1. Run your app
    2. While the app is running, go to Debug -> Attach to process by PID or name

enter image description here

  1. Write the name or bundle id of your extension and click attach

enter image description here

  1. Then run your extension with any way you can do this on your device.
  2. Wait for debugger to stop the extension at breakpoint.