title: React-Native: how to use "Remote JS Debugger" on real iOS-device?
body: <p>I'm wondering if react-native's <strong>Remote Debugger</strong> mode would be possible also on real device. But it stops me with an error page stating </p>
  
  <blockquote>
    <p>"Connecting to <a href="http://localhost:8081/debugger-proxy?role=client" rel="noreferrer">http://localhost:8081/debugger-proxy?role=client</a> timed
    out"</p>
  </blockquote>
  
  <p>The interesting fact here is that this URL won't also work on my developer machine.</p>
  
  <p>Opening this URL (<code>http://localhost:8081/debugger-proxy?role=client</code>) in a browser on my developer machine with running packager.js will respond with:</p>
  
  <blockquote>
    <p>Cannot GET /debugger-proxy?role=client</p>
  </blockquote>
  
  <p>When I turn off Remote debugger, everything works as expected.</p>
  
  <p>Steps to reproduce:</p>
  
  <ol>
  <li>react-native init testapp</li>
  <li>cd testapp/ios</li>
  <li>open the .xcodeproj-File with XCode</li>
  <li>Select my connected iPhone as target device</li>
  <li>Run the application</li>
  </ol>
  
  <p>The application will fetch the source code from my local machine. In order to make this work, both, the iPhone-device and my iMac, are connected to the same WiFi.</p>
  
  <p><a href="https://i.stack.imgur.com/Pmtq2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Pmtq2.png" alt="enter image description here"></a></p>
  
  <p>The ReactNative-Application is executed on the iPhone as expected. With the shake-gesture I spawn the developer menu and select the option "Debug JS Remotely".</p>
  
  <p><a href="https://i.stack.imgur.com/8odfd.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/8odfd.jpg" alt="enter image description here"></a></p>
  
  <p>Now this error appears as mentioned above.</p>
  
  <p>Following a side note in <a href="https://facebook.github.io/react-native/docs/running-on-device.html" rel="noreferrer">running-on-real device</a> I changed the Host from localhost to the IP-Address of my Mac in RCTWebSocketExecutor.m, but this results in an endlos loop while fetching.</p>
  
  <p>The Question is:</p>
  
  <p>How can I use the <strong>Remote JS Debugging</strong>-Feature on real device?</p>
  
  <p><a href="https://i.stack.imgur.com/1zJrt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1zJrt.png" alt="enter image description here"></a></p>
  
  <p><strong>Update</strong></p>
  
  <p>After further investigation I came to the conclusion that this might be a bug and opened the following <a href="https://github.com/facebook/react-native/issues/18629" rel="noreferrer">issue</a> on GitHub.</p>