The instructions can be found here, or React Native's official site. And I was expecting to get something like this as shown on the official site:
Whereas the reality is:
I run the command to install the devtool locally into my project:
npm install --save-dev react-devtools
Add one line to "scripts" node in package.json:
"react-devtools": "react-devtools"
Then I start up the Genymotion emulator, and have a cmd window running react-native start
, another cmd window running npm run react-devtools
, which will open up the standalone tool:
And I have a third cmd window running react-native run-android
. That will open a debugging tab in Chrome. However, nothing happens in the Developer Tool.
And I cannot find $r in the devtool of Chrome:
I thought it might be because the emulator talks to packager server which is localhost:8081
. But if I change that setting to: 192.168.1.2:8097
, as stated in Developer Tool:
I cannot even run the app in the emulator, it always stops like shown in the screenshot:
Has anyone managed to run it on Windows? Any help is appreciated, thanks.