Webstorm React Native Debug Command to Launch
Hello ever since I upgraded my RN project to 0.50 and webstorm to the latest the debugger in webstorm doesn't work both for headless chrome and for node. What should I put to the REACT_DEBUGGER Environment variable, open -g 'http://localhost:8081/debugger-ui' debugs in chrome not webstorm. If I don't add REACT_DEBUGGER then the debugger doesn't launch only the packager launches.
Please sign in to leave a comment.
Please describe your issue in details (when using Chrome as Debugger process - Node doesn't work currently and will likely be dropped).
Also, what WebStorm build do you use? Can you recreate the issue when using the default React Native app created with New | Project | React Native?
Ok it worked when I changed REACT_DEBUGGER to chrome --headless --remote-debugging-port=8081
So turns out without the debugging ability it works, but with it doesn't.
Here's my REACT_DEBUGGER
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --remote-debugging-port=8081 http://localhost:8081/debugger-ui && echo
The error I get from React Native is Expected HTTP 101 response but was '404 Not Found'.
And yes same issue when I create a new project.
WebStorm doesn't require setting REACT_DEBUGGER variable for debugging... Normally all you need for debugging is React Native run configuration...
See https://blog.jetbrains.com/webstorm/2016/12/developing-mobile-apps-with-react-native-in-webstorm/.
If you like to start Chrome is headless mode for debugging, you need to add --headless option to Chrome command line options as it's described in https://youtrack.jetbrains.com/issue/WEB-27323#comment=27-2348382