czwartek, 8 marca 2018

React Native Debugger + Expo + Windows

(based on
https://github.com/jhen0409/react-native-debugger/issues/84#issuecomment-303962375
and
https://streetsmartdev.com/debugging-react-native-expo-using-react-native-debugger/)

assumption: react native v. 0.52

1. Download https://github.com/jhen0409/react-native-debugger/releases and unpack it
2. npm install --only=dev react-native-debugger-open
3. In your package.json: 
"scripts": {
  "postinstall": "rndebugger-open --expo"
}
4. Find file node_modules/react-native/Libraries/Core.Devtools/setupDevtools.js and change 'localhost' to your phone address in local network
5. Run unpacked React Native Debugger.exe app
6. Close browser debugger-ui if opened
7. Run exp start . --lan
8. Manually run npm run postinstall in another terminal

9. Remember to set remote js debugging