gpt4 book ai didi

react-native - 无法在 iOS 应用程序的 mac 中的 React native 中连接远程调试器?

转载 作者:行者123 更新时间:2023-12-04 15:19:37 25 4
gpt4 key购买 nike

我正在尝试使用 chrome 进行调试。我在 VSCode 中添加了 React Native Tool 扩展,但出现错误:

[Error] Error: Unable to find plist file to configure debugging

当我使用 http://localhost:8081/debugger-ui/检查 chrome 时仍然无法连接调试器。

我是 React Native 的新手,如果需要有关此问题的更多信息,请提出建议

最佳答案

引用 react-native 网站的第一段,关于 Chrome Debugging

To debug the JavaScript code in Chrome, select "Debug JS Remotely" from the Developer Menu. This will open a new tab at http://localhost:8081/debugger-ui.

从技术上讲,在 iOS 模拟器 中,您必须执行以下组合 ctrl + cmd + z,然后点击 Debug JS Remotely code> 字段,这将进一步打开托管在以下地址 http://localhost:8081/debugger-ui

上的调试器

作为解决方法,在同一个 react-native 站点上,有一个页面解释了如何通过 standalone developer tool 调试应用程序。 ,作为 npm 包安装。

您所要做的就是通过 npmyarn 安装包(选择您最喜欢的包管理器:])

* the same react-native site recommends to install it globally

npm install -g react-devtools

yarn add global react-devtools

安装包后,只需在终端中输入以下命令即可打开 devtools

react-devtools

关于react-native - 无法在 iOS 应用程序的 mac 中的 React native 中连接远程调试器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63619202/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com