How do you debug React Native?

后端 未结 30 2696
无人共我
无人共我 2020-11-27 10:19

How does one debug their React code with React Native while the app is running in app simulator?

30条回答
  •  自闭症患者
    2020-11-27 10:22

    For Android: Ctrl + M (emulator) or Shake the phone (In Device) to reveal menu.

    For iOS: Cmd + D or Shake the Phone to reveal menu

    Make sure you have chrome.

    On the revealed menu select Debug JS Remotely Option.

    Chrome will be opened automatically at localhost:8081/debugger-ui. You can also manually go to debugger with this link.

    There reveal console and you can see logs being noted.

提交回复
热议问题