gpt4 book ai didi

google-chrome - 来自设备的 react native Chrome 调试已损坏? (运行时尚未准备好调试)

转载 作者:行者123 更新时间:2023-12-03 00:13:23 28 4
gpt4 key购买 nike

有人可以建议检查设备上 Chrome 调试是否中断的方法吗? Chrome 调试可以很好地调试 iOS 模拟器。

iOS 设备的 Chrome 调试一直工作正常一个多月,直到大约一周前停止工作。

我花了几天时间尝试让 Chrome 调试再次工作。我什至从头开始,有了一个新的“AwesomeProject”。运气不好。

调试设备和模拟器时,Chrome 调试 URL 是否保持相同?

enter image description here

使用 OS X 10.11.3、Xcode 7.3、iOS 9.3 和 React-native 0.22

  • MacBook WiFi:173.17.29.213
  • iPad WiFi:173.17.29.77
  • 我可以从 MacBook 上 ping iPad。
  • 我可以在 iPad 上运行 AwesomeProject 并启用实时重新加载。
  • 当 jsCodeLocation 设置为 localhost 时,我可以在模拟器中正常调试
  • 我杀死了 Chrome 并重新启动它,打开 http://localhost:8081/debugger-ui
  • React Packager 正在运行
  • 我可以设置 Xcode 断点

文件: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"
}
}

最佳答案

在面对具体情况后,您已经很接近了,又向前迈出了一步,并且现在为我工作:

“在真实设备上调试:

在 iOS 上 - 打开文件 RCTWebSocketExecutor.m 并将 localhost 更改为您计算机的 IP 地址。摇动设备以打开开发菜单,其中包含开始调试的选项。 [1]"

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

关于google-chrome - 来自设备的 react native Chrome 调试已损坏? (运行时尚未准备好调试),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36334959/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com