On device watchOS debugging impossible

It doesn't seem to be possible for me to debug on device wtih my apple watch. I can run my develpment app normally, but Xcode just can't seem to attach to a debugging session.


I've read the relase notes and have tried:


1) deleting the app/apps from devices and trying again

2) ensuring "Show App on Watch" is on for dev app

3) restarting all of: watch, phone, xcode, mac.

4) unpairing / pairing again


No dice.


When I click Run on the [AppName] WatchKit App scheme, the status window says "Running [AppName] WatchKit App on [Phone name]". It stays like that for about 45 seconds. Then it says "Finished running [AppName] WatchKit App on [Phone name]".


It really seems like the Phone->Watch connection is just way too slow. When I launch Xcode, it takes about 2 minutes before it considers my Phone+Watch pair as eligible for this scheme. During this initial 2 minutes, if I look into Window->Devices I don't see my watch listed even though I can clearly see it is paired.


I'm going to turn this into an official bug report, but I thought I'd check to see if I'm overlooking something obvious first since this is such a fundamental use case.


Device is an iPhone 5, by the way.


Post not yet marked as solved Up vote post of aawolf Down vote post of aawolf
17k views

Replies

I having the exact same problem. Again with an iPhone5.


I'm just trying a full reset and setting up the watch as a new device rather than a restore from backup as previously to see if that helps, but it seems like there's something that's causing all watch-phone communications to stall and timeout. It's not just debugging installing any apps to the watch takes an age (if they install at all).

Yes, as an update: I still haven't found a solution for this.


Is there anyone reading this who HAS been able to get a debugger session to attach to their watch?

Resetting worked for a time (I managed to get a project running from xcode in a debug state a few times) But then very soon things have started decending into chaos again. Xcode started failing to attach to process, then the watch app stopped launching at all, constant loading spinner even when started directly from the watch. Now I'm left with the app 'installed' on the watch, despite having been removed from the device, as if the communication between the two has just stopped flowing. Currently rebooting everything to see if things pick up again.


At least I now know it is possible, even if for a fleeting time.

One trick that seemed to help me was to fire up the camera capture app on the watch and take a pic. That seemed to kickstart the communication between the watch and phone and suddenly both XCode could see the Watch properly and apps both started installing quicker and attaching.

When I click Run on the [AppName] WatchKit App scheme, the status window says "Running [AppName] WatchKit App on [Phone name]". It stays like that for about 45 seconds. Then it says "Finished running [AppName] WatchKit App on [Phone name]".


Did the 'trust this computer' diaglog ever show on the watch? Unpairing and then re-pairing and restarting Xcode should have gotten you that prompt. The symptoms you are experiencing seem to indicate that this dialog was not presented after you upgraded.

It takes several minutes for an app to move from my phone to my watch. Completely impossible for me to debug. I run a build then just sit and wait for it to eventually install the new version on my watch then I test it. No debugging but I can test.

It worked !


I tried unpairing-repairing, trust computer, restart Xcode, then click Run. The status window said "Running [bundle identifier of watchkit extension] on [Phone name]" and my watch app launched on Watch, stopped at breakpoints.


Thanks !

Hey Mr. Bit, yes I had received the Trust this Computer prompt after unpairing/pairing. The dialoag has appeared another time out of the blue a couple days ago. I make sure to tap trust every time it appears. No difference in behavior.


One time in attempting this, the app actually openeded itself on the watch and showed an activity indicator. This made me think that it might actually start a debugging session, but after a minute or so my watch face went to sleep and it never started.

Thanks, MrBit! It worked for me too.


Here's all I did: unpair, repair (using latest OS2.0 backup), trust computer, restart Xcode and click Run button on Xcode.

Attatching took a while but finally debugger worked!

It worked fine, but sometimes installing watch app is so slow after I click Run.

In this case, you'd better reboot your Apple Watch.

I'm not sure what to make of that. Please file a bug report and include the iPhone's system log from the Xcode Device's window.

Is there any update on this?


I am struggeling with Beta 3 to debug my app on device, and I would like to avoid having to unpair/pair the watch.


Any hints?

Same here. Run an app from XCode, Apple Watch just spins a beach ball. Never runs. Restarted everything. Clean Project, etc. Same thing

Same here. Very frustrating. Spent entire day trying to get Beta 3 to work with my watch. Spinning activity indicator is all I get after click Run in Xcocde. I've re-paired several times. I've hit the trust button on the watch several times. I've done clean build and install. I've flipped tine Install/Uninstall in the Apple Watch app. I've tried to sift through the tons of lines coming out on the console for the phone. Does anyone know the magic to run the debugger on a watchOS 2 app running Beta 3 on a watch?

I'm guessing you have to be an Apple employee - surely they wouldn't tolerate the level of instability we are forced to put up with.