[英]React native for android run very slow when not enable “Debug JS”
[英]How start remote debug on the very first run in react native
如何在以本機運行的第一個應用程序上啟動遠程調試?
我使用開發人員菜單Debug JS Remotely
啟動Debug JS Remotely
,並且應用程序重新加載,因此無法調試僅在第一次運行時發生的代碼。
我終於在本文中找到了解決方案。
可以在iOS
上以編程方式Debug JS Remotely
啟動Debug JS Remotely
import { NativeModules } from 'react-native';
if (__DEV__) {
NativeModules.DevSettings.setIsDebuggingRemotely(true)
}
需要react-native-devsettings-android庫才能在android
上運行此代碼
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.