How can I view network requests (for debugging) in React Native?

前端 未结 12 1165
借酒劲吻你
借酒劲吻你 2020-11-28 03:16

I\'d like to view my network requests in React Native to help me debug - ideally in the \'Network\' tab of Chrome\'s devtools.

There are some closed issues about thi

12条回答
  •  一生所求
    2020-11-28 03:32

    If you have an android phone or emulator,

    • npx react-native start

    Then open the Android Studio.

    Open the android folder of your project as a Android Studio Project.

    Click that blue icon which it is Android Profiler

    After the Android Profiler start, you can add your app via grey plus icon near the SESSIONS label

    Now you can inspect networking via this tool. You can see triangles that shows your network activity.

    Please check this for more info about inspecting network traffic.

提交回复
热议问题