7

Can anyone suggest things to check for that break Chrome debug on a device? Chrome debug works fine debugging an iOS simulator.

Chrome debug of iOS devices had been working fine for over a month until it stopped working a week or so ago.

I have spent days trying to get Chrome debug working again. I even started all over, with a new "AwesomeProject". No luck.

Does Chrome Debug URL stay same for debugging both device and simulators?

enter image description here

Using OS X 10.11.3, Xcode 7.3, iOS 9.3, and react-native 0.22

  • MacBook WiFi: 173.17.29.213
  • iPad WiFi: 173.17.29.77
  • I can ping iPad from MacBook.
  • I can run AwesomeProject on iPad and enable live reload.
  • I can debug fine in a simulator when jsCodeLocation set to localhost
  • I killed Chrome and restarted it, opened http://localhost:8081/debugger-ui
  • React Packager is running
  • I can set Xcode breakpoints

File: AppDelegate.m

 jsCodeLocation = [NSURL URLWithString:@"http://173.17.29.213:8081/index.ios.bundle?platform=ios&dev=true"]; 

Xcode debug console displays:

2016-03-31 08:02:12.286 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:85] Runtime is not ready for debugging. - Make sure Packager server is running. - Make sure Chrome is running and not paused on a breakpoint or exception and try reloading again. 2016-03-31 08:02:12.319 [error][tid:main][RCTWebSocketExecutor.m:132] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" 2016-03-31 08:02:12.513 [fatal][tid:main] Runtime is not ready for debugging. Make sure Packager server is running. 2016-03-31 08:02:36.032 [error][tid:main][RCTWebSocketExecutor.m:132] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" 2016-03-31 08:02:36.032 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:85] Runtime is not ready for debugging. - Make sure Packager server is running. - Make sure Chrome is running and not paused on a breakpoint or exception and try reloading again. 2016-03-31 08:02:36.707 [fatal][tid:main] Runtime is not ready for debugging. Make sure Packager server is running. 

File: package.json

{ "name": "AwesomeProject", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start" }, "dependencies": { "react": "^0.14.8", "react-native": "^0.22.2" } } 

1 Answer 1

15

You're close, one more step and works for me at the moment after facing exact situation:

"To debug on a real device:

On iOS - open the file RCTWebSocketExecutor.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging. [1]"

[1] https://facebook.github.io/react-native/docs/debugging.html

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! I will never forget to do this again. I guess I had done that and forgot about it after I had re-built my project to fix some unknown npm issue. Thanks again for your time!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.