Unable to connect with remote debugger
In my case the issue was that the emulator was making a request to:
http://10.0.2.2:8081/debugger-ui
instead of:
http://localhost:8081/debugger-ui
and the request was failing.
To solve the issue: Before enabling remote debugging on your emulator, open http://localhost:8081/debugger-ui
in chrome. Then enable remote debugging and go back to the chrome page where you should see your console logs.
Solved the issue following:
- Press
Cmd + M
on emulator screen - Go to
Dev settings > Debug server host & port for device
- Set
localhost:8081
- Rerun the android app:
react-native run-android
Debugger is connected now!
I solved it doing adb reverse tcp:8081 tcp:8081
and then reload
on my phone.