3

What should I set in Run Debug Configuration in WebStorm to debug a app created by create-react-native-app?

enter image description here

I'm at a loss on how to debug since it doesn't use ~/.node_modules/lib/node_modules/react-native-cli but a custom module called react-native-scripts to start the compiling:

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"
  },
LazyOne
  • 158,824
  • 45
  • 388
  • 391
RedGiant
  • 4,444
  • 11
  • 59
  • 146
  • https://blog.jetbrains.com/webstorm/2016/12/developing-mobile-apps-with-react-native-in-webstorm/ -- is it still actual? This blog post has been edited today/yesterday .. so it should... – LazyOne May 16 '17 at 23:10
  • @LazyOne I can't find anything related to CRNA in the article, but I've left a comment on it. The main issue is I need to figure out how to start the CRNA's own react native package for webstorm to debug. – RedGiant May 16 '17 at 23:51
  • @RedGiant Debugging of create-react-native-app applications requires providing Expo support. This is not in out nearest plans unfortunately – lena May 24 '17 at 16:14

2 Answers2

1

You have to use Webstorm/Intellij 2018.1 (through EAP at the moment)

https://youtrack.jetbrains.com/issue/WEB-26951 https://blog.jetbrains.com/webstorm/2018/02/webstorm-2018-1-eap-181-3263/#debugging-expo

Gazihan Alankus
  • 11,256
  • 7
  • 46
  • 57
0

I dont think you can do this, at least not in an easy way, and why would you wan't to do it anyway?

React Native ships with great debugging capabilities "out of the box" via Chrome Developer Tools. Here you can debug code, both running on emulators, and even better on a real device. See here for details: https://facebook.github.io/react-native/docs/debugging.html

Plaul
  • 7,191
  • 5
  • 19
  • 22