Background Assets: How do I set breakpoints in the extension for debugging?

I've added a background downloads extension to my app and added device console logging to every method in the placeholder code created by XCode, and Setting a breakpoint, then installed the app to the phone.

When I run the following command: xcrun backgroundassets-debug --app-bundle-id com.myCompany.myApp --device-id 00008110-001E0DDA0AB8801E --simulate --app-update 

prompt: Application was updated event was sent for app identifier: (com.myCompany.myApp).

But the break point did not enter。Nothing is sent, and there is no log output

How do I set breakpoints in the extension for debugging?

same problem, any progress?

Select the extension from the scheme selector, and bring up the scheme editor. Navigate to: Run->Launch and then select "Wait for executable to be launched.".

Now click the "Play" button, you'll see that Xcode will now show that its waiting on the extension to launch for it to attach. If you then invoke xcrun backgroundassets-debug, your extension will launch and the debugger will connect.

I hava the same problem, and change scheme not work for me, did you solve this? Thanks!

It seems that after Xcode 15, you need to debug in a different way. Here are the steps:

  1. Add a breakpoint in the extension code.
  2. Run the app (not extension).
  3. Navigate to "Debug", then select "Attach Process by PID or Name"
  4. Enter your extension target's name (e.g., BackgroundDownloadExtension) in the input field.
  5. Open the Terminal app.
  6. Enter the command like this: xcrun backgroundassets-debug --app-bundle-id [com....] --device-id [3...f] --simulate --app-update and click "Attach".
  7. Breakpoint entered!

I am using XCode 15 and following the above steps to debug but still my break point in extension code does not hit.

Background Assets: How do I set breakpoints in the extension for debugging?
 
 
Q