6

Recently I started developing in react-native. When trying to debug using the react-devtools extension on the browser (Chrome) I only get access to the console, because all the components and elements are the ones displayed in the devtools web-page (http://localhost:8081/debugger-ui/) So now I am trying using the react-native standalone version but it is "waiting for React to connect.." and I get a message at the bottom saying "The server is listening on the port 8097".

I don't know much about ports but it looks to me that the application is on one port (8081) whereas the react-devtools is listening to another (8097).

I tried using adb reverse tcp:8097 tcp:8097 before running the react-devtools but it made no difference.

How do I check what port my app is listening to?

How can I make the standalone devtools run?

And if anyone can link me to a good documentation about ports for people with no background it would be very nice as well.

Yariv Shamash
  • 91
  • 1
  • 8
  • Does this answer your question? [React native Cannot connect to react-devtools using android simulator](https://stackoverflow.com/questions/50867874/react-native-cannot-connect-to-react-devtools-using-android-simulator) – Andrew Jul 15 '22 at 12:17

1 Answers1

2

you are on the right track, after assigning port 8097.

Run Command+d to open the development menu and it is automatically detected by react-devtools.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77