I'm trying to get better debugging with React Native using react-devtools
npm install -g react-devtools && react-devtools*
But it always show connecting...
It doesn't work
I'm trying to get better debugging with React Native using react-devtools
npm install -g react-devtools && react-devtools*
But it always show connecting...
It doesn't work
Under the scripts
section in your package.json, add the following:
"debug": "react-devtools"
Then run npm run debug
from your project directory. Your app should now connect.
You can also look into React Native Debugger which is a bit easier to use (in my opinion).
If you are trying to debug an attached device:
Make sure the device is connected via adb
adb devices
Ensure adb reverse is enabled for port 8097
adb reverse tcp:8097 tcp:8097
react-devtools
I've found the following 2 pages very useful:
http://facebook.github.io/react-native/docs/debugging
https://facebook.github.io/react-native/docs/running-on-device