Xcode do not pause at breakponts on "Wait for the executable to be lauched" mode

On Xcode 15, when I launch my app on "Wait for the executable to be lauched" mode, I can't debug because Xcode simply doesn't pause at my breakpoints. They change their look and turn to dotted blue outlined. When I hover over breakpoint Xcode shows a message: Xcode won't pause at this breakpoint because it has not been resolved Resolving it requires that:

The line at the breakpoint is compiled. The compiler generates debug information that is not stripped out (check the Build Settings). The library for the breakpoint is loaded.

On the other hand, when I launch it on "Automatically" mode, everything works fine.

Does anyone have any ideas how to solve it? Best regards.

Where are you running this app? Locally on your Mac? In a simulator? Or on an attached device?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm running locally on my Mac on real devices (tested on iPhone 14 Pro Max and iPhone 13 Pro, both iOS 17). I also tested in a simulator and the debug works fine on "Wait for the executable to be lauched" mode. The problem only occours on attached devices.

Thanks for that info?

Are you able to test this with an iOS 16 device?

If you repeat this with a newly created small test project, does it show the same problem?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Screenshot:

Sorry for the delay responding here; this got lost in my to-do list )-:

I set up a test for this today:

  • I’m using Xcode 15.0 running on macOS 13.6.1.

  • I’m targeting iOS 17.0 and 16.7.2.

  • I create a new test project from the iOS > App template.

  • I set “Wait for the executable to be launched” in the scheme editor. Without that, everything works just fine.

For each test:

  1. I set a breakpoint in application(_:didFinishLaunchingWithOptions:).

  2. Then selected the target run destination.

  3. I chose Product > Run.

  4. And launched the app from the Home screen on iOS.

On iOS 16.7.2 this worked as expected. I stopped at the breakpoint.

On iOS 17.0 it failed as you described: I didn’t stop at the breakpoint. Curiously, when I paused the app Xcode didn’t show the breakpoint as unresolved. However, it clearly is unresolved because LLDB does not show any locations for it:

(lldb)  break list 
Current breakpoints:
1: file = '/Users/quinn/Desktop/Test739914/Test739914/AppDelegate.swift', line = 17, exact_match = 0, locations = 0 (pending)

Something has gone very wrong with symbols, because none of the backtraces in the Debug navigator show any symbols. When I tried to investigate that I saw this:

(lldb) image list 
error: the target has no associated executable images

That’s bad. It’s not just a question of Xcode not being able to find the symbols for your program; it can’t even find the Mach-O images in your process.


Unfortunately I don’t have any great insight into this. I recommend that you retest with all the latest beta stuff. If that still fails, please file a bug and post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi @douglasantoniaz Do you have any update on this ? I have the same problem and it's quite boring. thanks

Also wondering if there's an open issue to track this. Bitten me too, and I need the debugger :)

douglasantoniaz didn’t post a bug number, so I’ve no thread to pull on here. If this is causing you grief I recommend that you file your own bug, then post the bug number here, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hey folks! There's a number of these threads open and now a bug number. I'm cross-posting for visibility and will update if I find more:

Thanks for uncovering FB13529134.

I had a quick look at that and it seems to be a real bug. Multiple folks have reported it and we can reproduce it internally. It seems to be caused by a poor interaction between LLDB and the new dynamic linker in the iOS 17 and up simulator. I don’t have any info to share as to when it’ll be fixed.

I don’t see any way to work around this directly, but you might be able to take a different approach. My go-to technique for stuff like this is to call pause in my main function. The app then stops waiting for a signal and you can attach to it using Debug > Attach to Process. The neat thing about pause is that the act of attaching generates a signal which unpauses your app when you choose Debug > Continue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for looking into this, Quinn. I am having the same issue. I have also submitted a request through feedback assistant regarding inoperative breakpoints in ios16, which along with repeated crashes in the simulator in iOS17 (AegirPoster, ManageAppDistributionD, FindMyLocateD) have slowed my development to a crawl.

@hassaands Quinn's workaround does not work for me either. When I attach the breakpoints become dotted again as well. Also when I simply toggle between activate/deactivate breakpoints Xcode can't seem to present the appropriate UI update for the breakpoint based on the expected state. Been dealing with this since the release of XCode 15. I have project targeting Mac and iOS targets. Breakpoints have always worked for iOS targets against my old iPad Pro running 15.7 but NOT for Mac targets. Currently using latest XCode 15.3 and Mac OS 14.4. Is this some post-silicon-advent specific bug? Concerning that Apple hasn't been able to offer a fix in a more timely manner.

What iOS version are you testing this with?

I looked at FB13529134 and its resolution suggests that this was fixed in iOS 17.4. And I just tested it today (using the process described above but with Xcode 15.3 on macOS 14.4.1 targeting iOS 17.4.1) and it’s working for me now.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Xcode do not pause at breakponts on "Wait for the executable to be lauched" mode
 
 
Q