真机升级livereload后丢失,真机无法远程调试js [英] After upgrade livereload missing on real device, cannot debug js remotely from real device
问题描述
将 react native 从 0.26 更新到 0.29 后,开发菜单中缺少实时重新加载和热代码推送项,因此我每次都必须手动重新加载应用程序.但是,它在模拟器中工作.我在升级时搞砸了什么吗?我尝试更新到 0.30,但没有帮助.
After updating react native from 0.26 to 0.29, live reload and hot code push items are missing in dev menu, so I have to manually reload the app every time. However, it's working in simulator. Have I messed up something while upgrading? I tried to update to 0.30, but didn't help.
此外,从真实设备进行远程调试不起作用,仅在模拟器中运行应用程序时才起作用.我收到此错误:运行时尚未准备好进行调试,但我确信打包服务器正在运行,它没有在断点处暂停.有什么想法吗?
Also, remote debugging from real device doesn't work, works only while running app in simulator. I get this error: Runtime is not ready for debugging, but I'm sure that packager server is running, it's not paused on breakpoint. Any ideas?
反应版本:15.2.1守望者版本:4.5.0
React version: 15.2.1 Watchman version: 4.5.0
谢谢:)
推荐答案
找出使实时重新加载工作所需的配置:
Figured out the needed configuration for make live reload work:
jsCodeLocation = [NSURL URLWithString: @"http://192.168.0.200:8081/index.ios.bundle?platform=ios&dev=true"];
还要注意,如果没有?platform=ios&dev=true"热重载对我不起作用(不平衡调用开始/结束"错误).
在 RCTWebSocketExecutor.m 中:
and in RCTWebSocketExecutor.m:
host = @"http://192.168.0.200";
192.168.0.200 - 您计算机的地址.计算机和设备必须在同一网络中.在出现shake"开发菜单中的Live Reload"项目之后,我也开始在服务器控制台中看到日志:
192.168.0.200 - address of your computer. Both computer and device have to be in the same network. After that "Live Reload" item in "shake" dev menu appeared and also i started to see logs in server console:
以及@jmancherje提到的必须在同一个wifi网络上"
and also "gotta be on the same wifi network" as @jmancherje mentioned
这篇关于真机升级livereload后丢失,真机无法远程调试js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!