How to Debug an iOS Extension (.Appex)

How to debug an iOS app extension?

I found a way, it's not perfect but at least i can see what i print now.
I used os_log("this is what i will see") function (you have to import os)

1- i set an environment variable OS_ACTIVITY_MODE = default (not disable) in my extension's scheme

2- i run build my application in my device

3- i attach my extension to a process (my app)

4- you can see your logs in the Console app (Open /Applications/Utilities/Console.app) or opening Windows -> Devices and Simulators to see your devices console.

The Console app option is the best.

Error debugging the IOS Extensions in Visual Studios Xamarin

As mentioned by SushiHangover, debugging iOS extensions in Visual Studio is available in 4.3.0.550 (RC) and introduced in 4.3.0.405.

As of this writing, 4.3.0.550 is available through the beta channel.

As a note, make sure that your Mac Build Agent is running on the same version.

How to debug Objective C for an iOS application in Xcode 11

It seems that I was doing things wrong, Debugger does not attach automatically to debugger, we need to attach it manually as answered in How to debug ios share extension?

How to attach debugger to iOS app after launch?


  • Attach your device connected your Mac
  • Debug > Attach to Process by PID or Name
  • In the dialog sheet, enter the name of your App as it appears in the Debug navigator when started via Xcode (e.g. Target's name not bundle-id).

If the app is already running, the debugger will attach to the running process. If it isn't running, it will wait for the app to launch and then attach.

Debug Notification Extensions

Change the target to run the extension

Change Target

then select run and choose your app from the 'Choose an app to run:' window.

Sample Image



Related Topics



Leave a reply



Submit