Cannot start debug session on Watch simulator using Xcode 12 (12A7209)

Trying to port existing iPhone and Watch apps to iOS 14/WatchOS 7, and while there are no issues debugging the iPhone app, I cannot initiate a debugging session on the Watch simulator. Xcode stays stuck with this message in the debug pane:
<My WatchOS app name> Waiting to attach

Does anyone know why this is failing with a fresh install of Xcode 12? I'm on Catalina - 10.15.6.

Unfortunately because of the pandemic, I cannot debug on a real device - only the simulator, so this is a major issue.

Any suggestions would be highly appreciated.

Thanks



Answered by sal_from_new_york in 636363022
The issue must be uniquely related to my WatchOS app. Xcode 12 works fine with sample programs. For now I will debug by starting the WatchOS app manually and attaching to it. The shortcoming of this strategy is that all the debug statements no longer go to the Xcode console but rather to the OS X console's WatchOS simulator. It's the best I can do at the moment.

Thanks
Accepted Answer
The issue must be uniquely related to my WatchOS app. Xcode 12 works fine with sample programs. For now I will debug by starting the WatchOS app manually and attaching to it. The shortcoming of this strategy is that all the debug statements no longer go to the Xcode console but rather to the OS X console's WatchOS simulator. It's the best I can do at the moment.

Thanks
I'm extremely embarrassed, but I finally figured out why Xcode 12's debugger was not starting and attaching to my WatchOS app. It was because I had set the scheme for my WatchOS app to not start automatically, and to wait until it was manually run.

I had this setting in Xcode 11 a long time ago, but for the simulator it never really worked, it would just always automatically launch the app, so I forgot all about it.

So with the exception that on the WatchOS 7 simulator the automatic "waiting to attach to app" still doesn't work, everything else is fine.
Cannot start debug session on Watch simulator using Xcode 12 (12A7209)
 
 
Q