有人可以建议检查设备上的Chrome调试吗? Chrome调试可以很好地调试iOS模拟器。
iOS设备的Chrome调试已经运行了一个多月,直到它在大约一周前停止工作。
我花了好几天时间尝试让Chrome调试再次运行。我甚至开始了全新的#34; AwesomeProject"。没有运气。
Chrome Debug URL是否保持相同以调试设备和模拟器?
使用OS X 10.11.3,Xcode 7.3,iOS 9.3和react-native 0.22
文件:AppDelegate.m
jsCodeLocation = [NSURL URLWithString:@"http://173.17.29.213:8081/index.ios.bundle?platform=ios&dev=true"];
Xcode调试控制台显示:
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.
文件: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"
}
}
答案 0 :(得分:15)
在面对确切的情况之后,你又向我迈出了一步,并为我工作:
"要在真实设备上进行调试:
在iOS上 - 打开文件RCTWebSocketExecutor.m并将localhost更改为您计算机的IP地址。摇动设备以打开开发菜单,并选择开始调试。 [1]"
[1] https://facebook.github.io/react-native/docs/debugging.html