Bug 41554 - [WatchOS2] Could not connect to the debugger when run WatchOS2 application on Watch device.
Summary: [WatchOS2] Could not connect to the debugger when run WatchOS2 application on...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.10 (C8)
Hardware: PC Mac OS
: High major
Target Milestone: 10.0.0 (C8)
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Blocks: 33770
  Show dependency tree
Reported: 2016-06-07 12:50 UTC by Saurabh
Modified: 2016-09-09 11:01 UTC (History)
5 users (show)

Tags: C8Beta1
Is this bug a regression?: No
Last known good build:

verbose using Watch OS UDID (42.07 KB, text/plain)
2016-09-09 10:14 UTC, Saurabh
verbose using UDID of iPhone (48.87 KB, text/plain)
2016-09-09 10:16 UTC, Saurabh

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Saurabh 2016-06-07 12:50:21 UTC
Steps to reproduce:
1. Open or create iOS Single view application.
2. Add WatchOS2 template.
3. Set valid provisioning profile.
4. make sure watch device displaying in dropdown
5. Debug the application on Watch device.

Actual Result: Application deployed on watch device but debugger not connected.

Expected Result: Debugger should connect.

Supplement Info and Environment details:
Application Output: https://gist.github.com/Arpit360/9bcb00ca9bb275d1eaf6505132163176

Device Info:
Watch device version 2.2.1
iPhone 6S version 9.3.2
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-06-07 12:54:30 UTC
This is a known issue, and will not be fixed for the upcoming preview.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2016-09-01 14:59:06 UTC
PR: https://github.com/xamarin/xamarin-macios/pull/732
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-09-01 16:00:08 UTC
PR merged (master): https://github.com/xamarin/xamarin-macios/commit/d747998128fcfb643f42c92b015748d8c2583d85
Comment 5 Rolf Bjarne Kvinge [MSFT] 2016-09-01 16:03:07 UTC
An updated XS is also required for the fix to be complete (md-addins 05b0b4175687df174e5087e22d6c431e5c9f9640).
Comment 6 Rolf Bjarne Kvinge [MSFT] 2016-09-01 16:36:01 UTC
Some notes about debugging on watchOS device can be found here: https://github.com/xamarin/xamarin-macios/wiki/Debugging-on-watchOS-device
Comment 7 Oleg Demchenko 2016-09-02 17:48:41 UTC
Verified with XS Version 6.2 (build 424) and XI

Comment 8 Rolf Bjarne Kvinge [MSFT] 2016-09-05 15:29:11 UTC
This has been merged to cycle8: https://github.com/xamarin/xamarin-macios/commit/4298ebfdfb5035ff2388681b8b6ee366c4b8c88c
Comment 9 Saurabh 2016-09-09 09:05:47 UTC
I have checked this Issue with latest Cycle 8 builds(XI, I am still getting this Issue (Not connected to debugger).

Environment info and Logs: https://gist.github.com/tajinder360/f387f683a5713b4d616ae2eed4e9dd6a

Application Output: https://gist.github.com/saurabh360/ee2e93d4cb86ab5649bb05b63b4ff42c
Watch Device log: https://gist.github.com/saurabh360/bef2ee09c1bef4b77ea5152e38995018
iOS Device log: https://gist.github.com/saurabh360/d6814c3f3ae4624f1b436aeeb63b16ad
Comment 10 Rolf Bjarne Kvinge [MSFT] 2016-09-09 09:39:50 UTC
@Saurabh, can you enable verbose mlaunch logging as described here: https://github.com/xamarin/xamarin-macios/wiki/Debugging-on-watchOS-device and attach the Application Output from when it fails?
Comment 11 Saurabh 2016-09-09 10:14:53 UTC
Created attachment 17394 [details]
verbose using Watch OS UDID
Comment 12 Saurabh 2016-09-09 10:16:52 UTC
Created attachment 17395 [details]
verbose using UDID of iPhone
Comment 13 Saurabh 2016-09-09 10:17:39 UTC
Provide logs in above comments#11 and comment#12
Comment 14 Rolf Bjarne Kvinge [MSFT] 2016-09-09 10:20:16 UTC
@Saurabh, what I need is the output in the Application Output pad from Xamarin Studio.
Comment 15 Saurabh 2016-09-09 10:32:22 UTC
Application Output: https://gist.github.com/saurabh360/10a300eb07fb307c18219201bff8b3df
Comment 16 Rolf Bjarne Kvinge [MSFT] 2016-09-09 10:35:09 UTC
@Saurabh, there seems to be something wrong with the network connection between the watch and the mac:

a) Is the IP of the mac correct:
b) Is the phone connected to that same network (using wifi)?
c) Does debugging on the phone work if you enable wifi debugging?
Comment 17 Saurabh 2016-09-09 10:52:53 UTC
@Rolf,Now I have both watch and iOS device on same network, breakpoint getting hit successfully.

Application Output: https://gist.github.com/saurabh360/afe08e84925dacedff977dd3d1ed1a9e

So now for debugging on watchOS we will have these perquisite: https://github.com/xamarin/xamarin-macios/wiki/Debugging-on-watchOS-device ?

If this is correct behaviour the we can close it
Comment 18 Rolf Bjarne Kvinge [MSFT] 2016-09-09 10:54:39 UTC
Yes, it will always be required to have all devices/machines on the same network for debugging to work.
Comment 19 Saurabh 2016-09-09 11:01:36 UTC

As per comment#17 and comment#18 changing the status to verified.