title: Xcode disconnecting from simulator or device when going to homescreen
body: <p>I'm trying to debug an handoff issue in Xcode, but the debugger disconnects every time I go to the device homescreen.  This happens on both the simulator and an actual device.</p>
  
  <p>I have other apps where it works correctly; that is, it continues to debug when I go to the homescreen.</p>
  
  <p>Any ideas what could be causing this?  I've rebooted Xcode and my Mac with no luck.</p>
  
  <p>When running on the device, the log has a message that looks like:</p>
  
  <pre><code>Jun 28 16:36:31 Mikes-iPhone com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-340.3.124
      [14593] &lt;Warning&gt;: 1 +0.000000 sec [3901/1307]: error: ::read ( -1, 0x16e246a38, 1024 ) =&gt; -1 err = Bad file descriptor (0x00000009)
  Jun 28 16:36:31 Mikes-iPhone com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-340.3.124
      [14593] &lt;Warning&gt;: Exiting.
  Jun 28 16:36:31 Mikes-iPhone mediaserverd[14247] &lt;Notice&gt;: '' com.zzzzzz.appname(pid = 14594) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
  </code></pre>
  
  <p>I'd appreciate any ideas or suggestions....</p>