WebStorm + ReactNative?

7.4k views Asked by At

Is it possible to debug ReactNative code from WebStorm? ReactNative allows debug from Chrome/Safari, maybe WebStorm could use these ports for debugging from IDE somehow?

2

There are 2 answers

4
David Kay On BEST ANSWER

According to the React Native Docs, there's no way to do it right now.

Why? Because when using "Debug in Chrome," you're actually running all your Javascript code inside of Chrome! The native app simply pulls all the data from Chrome via websocket.

So to implement React Native debugging in WebStorm, it seems like you'll need to come up with either of the following:

  1. A way to run your JS code inside of WebStorm, passing the data to the native app via websocket.
  2. A way to modify React Native's Chrome-side code to allow WebStorm to connect to it, like GDB would to a C application.

Hope this helps.

1
Paul Reichelt-Ritter On

With the new 2016.3 EAP of WebStorm and as well IDEA you can now debug react-native apps:

https://blog.jetbrains.com/webstorm/2016/10/webstorm-2016-3-eap-163-6512/