Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native debug on windows

I have a react native android app that i am currently debugging on a windows machine with a android emulator.

I can hit http://localhost:8081/debugger-ui

And it tells me that

React Native JS code runs inside this Chrome tab.

Press ⌘⌥J to open Developer Tools. Enable Pause On Caught Exceptions for a better debugging experience.

Status: Waiting, press ⌘R in simulator to reload and connect.

When I open up the chrome developer tool, I do not see my react code being loaded into the "source" of that tab.

So my question is, how do I make it so that my phone loads the react stuff into the chrome tab? I wish to at least see the console.log stuff appearing in my chrome developer tool.

like image 889
Zhen Liu Avatar asked Sep 11 '16 01:09

Zhen Liu


People also ask

How do I use React Native debugger in Windows?

Connecting a React Native app to React Native Debugger To connect your app with React Native Debugger, you need to run your app and start debug mode. To start debug mode, shake your mobile device or press Command + Shift + Z or Ctrl + M and choose the debug option.

How do you debug using React Native debugger?

Debugging React Native AppsPress Command + D and a webpage should open up at http://localhost:8081/debugger-ui. (Chrome only for now) or use the Shake Gesture. Enable Pause On Caught Exceptions for a better debugging experience.

How do I use React Native debugger with Expo?

The setup is as follows: Download React Native Debugger from the releases page. Open the app, press Cmd ⌘ + T or Ctrl + T to open a new window, then set the port to 19000. Start your app, open the in-app developer menu, and select “Debug JS Remotely.”


1 Answers

OK. Found what to do:

  1. Ctrl + M to open up some "developer menu"
  2. click on enable remote JS debugging
  3. Depending on your react native version, chrome may or may not open up the debugging tab. But in any case, go to localhost:8081/debugger-ui should do it.
like image 139
Zhen Liu Avatar answered Sep 23 '22 16:09

Zhen Liu