简体   繁体   English

为什么我的反应原生调试器不起作用?

[英]Why my react native debugger is not working?

The react-native debugger was working perfectly fine for the very first time. react-native 调试器第一次工作得非常好。 But later on, when I opened my pc and tried to run my current project, the debugger was not working.但后来,当我打开我的电脑并尝试运行我当前的项目时,调试器无法正常工作。 I tried everything on my own up to the extent but was totally frustrated with this issue.我尽我所能尝试了一切,但对这个问题感到非常沮丧。 Cleared my node modules for several times, thought that the error was with the version of node and installed several old versions of node but all my efforts went on vain.多次清除我的节点模块,认为错误与节点版本有关并安装了几个旧版本的节点,但我所有的努力都是徒劳的。 At last, I am here seeking help from all the react-native experts out there.最后,我在这里寻求所有 react-native 专家的帮助。 Hope you will resolve my problem.希望你能解决我的问题。

  1. Make sure it is enabled JS debugging on the device is enabled.确保它已启用 设备上的 JS 调试已启用。
  2. Close the app on the phone but make sure the local server is running.关闭手机上的应用程序,但确保本地服务器正在运行。
  3. Manually open Chrome and go to link: http://localhost:19001/debugger-ui手动打开 Chrome 并转到链接: http://localhost:19001/debugger-ui
  4. Be sure to change the port to the correct one for you.请务必将端口更改为适合您的端口。
  5. Once the debugger opens, open the app on the device.调试器打开后,打开设备上的应用程序。

I had a same issue yesterday and this fixed it for me.我昨天遇到了同样的问题,这为我解决了。 Just had to open the debugger first then run the app.只需要先打开调试器然后运行应用程序。

Fistly check if you have enabled the debugging mode in your app, if not then ctrl+m and enable 'remote JS debugging'.首先检查您是否在应用程序中启用了调试模式,如果没有,则 ctrl+m 并启用“远程 JS 调试”。 If your app is in debugging mode and still you cant find the debugger check all the tabs of your browser is open, it must be open somewhere (this happens in mac).如果您的应用程序处于调试模式并且仍然无法找到调试器,请检查浏览器的所有选项卡是否已打开,它必须在某处打开(这发生在 mac 中)。

Try to turn off and then turn on again wifi on your computer尝试关闭然后再次打开计算机上的 wifi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我在 React Native 中的 Ref 不起作用? - Why is my Ref in React Native not working? React Native Debugger:为什么我不能在我的 Redux saga 中设置断点? - React Native Debugger: why can't I put a breakpoint at this point in my Redux saga? 为什么 props 不能与我的子组件 React JS (react native) 一起使用 - Why props is not working with my child component React JS (react native) Babel为什么不从事我的React Native项目? - Why isn't Babel working on my React Native project? 为什么 React Native Picker 在我的 Android 模拟器中不起作用? - Why is the React Native Picker not working in my Android emulator? 为什么 https 请求在我的 react-native 应用程序中不起作用? - why https request is not working in my react-native app? 为什么我的 Reanimated (React Native) 代码在 Android 上不起作用? - Why is my Reanimated (React Native) code not working on Android? 本机反应中的调试器问题? - Debugger issue in react native? axios 请求仅在启用 react-native-debugger 时才有效 - axios request with headers only working if react-native-debugger is enabled 如何防止 React / React Native 在 React Native 调试器中自动将堆栈跟踪附加到我的控制台警告 - How to prevent React / React Native from automatically attaching a stacktrace to my console warnings in the React Native Debugger
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM