Live Debugging on Watch Device???

This may turn into a rant but I am looking for guidance on how to efficiently debug Watch OS 2 apps on the watch device. I must be doing something wrong because what is happening now is random, frustrating and time-consuming. Basically, it's a crap shoot to get it working and there are so many random behaviors it is difficult to describe what happens or to file a radar.


I have no problems at all debugging my watch app on the watch simulators where I simply Build & Run, and the watch simulator eventually launches with my logging showing up immediately in the debug output window. So, I expected the same process choosing the scheme where my paired watch has the app and extension installed.


What happens (besides trying to fight with my iPhone to keep it and the watch awake) is I click Build & Run and there are a bunch of messages flashing across the top of Xcode, and then I wait, and wait, and look up to see that the Stop button is dimmed and the entire process quit. Then I click B&R again, and more messages appear, and sometimes (after a lengthy pause) Xcode comes to life, seemingly attaching the extension, but 3 out of 4 times, I get another error message like "Install of Apple Watch Application never finished." and I click B&R again and usually the third (or fourth) time clicking B&R, Xcode said my watch app is running, but it has not launched, and so I have to find the icon on the watch and tap on it to launch it and eventually the log messages start appearing in the debug output window and I can try to debug. Other times, I launch the app, and it just turns off and I have to launch it again, and so on.


I opened up my Schemes and made sure they match exactly the config of a new watch OS 2 project.


So, is this common behavoir with trying to debug on the watch itself? Is there something I am missing in the Scheme? And what *is* the normal process supposed to be when debugging on the watch?


Thanks.

You're right. It's a bit frustrating...

Sorry if I missed it - which version Xcode?

Yes, debugging and launching project from XCode can be someitmes a bit time consuming and random. Also note that for larger projects just uploading the app to Apple Watch can take quite a lot of time. Sometimes the application launch in debug hangs (or launches in background) and you need to redo the process. It isn't clear for me as why this happens or how to prevent it.


AFAIK, there is no fix to get debugging working 100% reliably on XCode. Hopefully Apple will fix / improve / speed up the development tools so that developing apps on Apple Watch would be similar experience as developing them on iOS devices.

And not to mention the issues I've also had with testing localizations on the watch. Even in the simulator, editing schemes for regions/languages for the watch app does not seem to have any effect, and there is no language/region option in the simulator's Watch app. When I tried testing my localizations on the actual watch device (by changing the locale settings in Watch on my iPhone), and the same random errors occurred and Xcode even crashed at one point.


And I do not want to even think about submitting the watch app with the usual provisioning **** and gotchas I expect to spend hours solving.


I don't remember this much difficulty wtih Watch OS 1 (but I may have repressed what happened 😉


I'm using Xcode the release version of 7.1 since many months ago I gave up trying to use beta versions and now always wait for the release version since even then there are still many issues (as demonstrated here).


And thanks for the feedback confirming that I am not alone in my frustration.

Over 2 years later and, if you ask me, things have got no better in that time. Seems notoriously unreliable and when it works, painfully slow. The insistence that everything is done over bluetooth with the iPhone acting as a relay is really REALLY annoying. I'm working on a WatchKit app in my spare time and it takes HOURS to get anything meaningful done. I have no idea how anyone would estimate / develop for this platform in a professional environment.

Live Debugging on Watch Device???
 
 
Q