WebStorm调试create-react-native-app

问题描述 投票:3回答:2

我应该在WebStorm中的Run Debug Configuration中设置什么来调试create-react-native-app创建的应用程序?

enter image description here

我对如何调试感到茫然,因为它不使用~/.node_modules/lib/node_modules/react-native-cli而是使用一个名为react-native-scripts的自定义模块来开始编译:

的package.json:

 "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch",
    "menu": "adb shell input keyevent 82"
  },
react-native webstorm react-native-android create-react-native-app
2个回答
1
投票

我不认为你能做到这一点,至少不是一个简单的方法,为什么你还想做呢?

React Native通过Chrome开发者工具“开箱即用”,具有出色的调试功能。在这里,您可以调试在仿真器上运行的代码,甚至可以在真实设备上运行。详情请见:https://facebook.github.io/react-native/docs/debugging.html


© www.soinside.com 2019 - 2024. All rights reserved.