5

Problem: I cannot get the Xcode debugger to attach to my new Apple Watch

Hardware:

  • Apple Watch Series 3 (no GPS)
  • iPhone 6s

Where it works:

  • Debugger works fine on the physical iPhone
  • Simulators work great (both iPhone and Apple Watch)

Things I've tried:

  • Restarting all three devices (Mac, iPhone, Apple Watch)
  • Formatting and reinstalling iOS 11 on my iPhone
  • Unpairing and repairing the Apple Watch (done this 1000 times)
  • Completely removing all of Xcode and reinstalling from the app store (deleting simulators, sdks--everything)

Other things:

  • I've made sure to trust this computer
  • I've started a brand new project just to make sure it's not something in my code.

It shows up in Xcode as a valid target, but when I build it just says "Running App on Jason's Apple Watch." It installs the app, but doesn't start it, and the debugger doesn't hit any breakpoints.

Jason
  • 13,563
  • 15
  • 74
  • 125

2 Answers2

1

Attempt to attach the debugger manually to the Likely Targets.

XCode -> Debug -> Attach to Process -> Likely Targets -> Your Project

I had this same issue and am uncertain of why this started happening to me. If someone knows how to permanent fix this problem, please feel free to edit this answer.

Attach to Likely Targets

Victor 'Chris' Cabral
  • 2,135
  • 1
  • 16
  • 33
  • My watchApp builds and installs on the watch, but the debugger does not attach. It was working fine up to a few days ago - maybe when I upgraded Xcode fro 9.3 to 9.4 Beta. I have now reverted to 9.3 and the problem persists. The Build and Run process terminates with "Finished running {app name} on Alan's Apple Watch. The app did not start on the watch. – alan.raceQs Jun 06 '18 at 22:54
  • I am using 9.4 and have to attach the process manually as shown above. Maybe it is a 9.4 problem. – Victor 'Chris' Cabral Jun 08 '18 at 13:42
  • 1
    And now I have installed Xcode 9.4 (release Version 9.4 (9F1027a), not Beta) it's working fine again! Apple's QA is shit! – alan.raceQs Jun 09 '18 at 21:50
0

It started working. Not sure what specific thing it was, but I enabled all the checks in the debugger scheme. Posting in case this helps someone else:

enter image description here

enter image description here

Jason
  • 13,563
  • 15
  • 74
  • 125
  • I'm having the exact same problem, only difference is my Watch is Series 0. I have not had this issue with WatchOS 4.0 and have been testing my watch regularly over the past few weeks, so I thought it might be something related to Watch OS 4.1 which I installed yesterday but looking at your post Oct 29th was prior to the release, unless you were running the beta? – GarySabo Nov 01 '17 at 22:58
  • finally fixed it, this is what solved it for me: https://stackoverflow.com/questions/31350957/fbsopenapplicationerrordomain-error-1 – GarySabo Nov 02 '17 at 21:05