无法在 mac for iOS 应用程序中连接 React native 中的远程调试器? [英] Not able to connect remote debugger in React native in mac for iOS app?
问题描述
我正在尝试使用 chrome 进行调试.我在 VSCode 中添加了 React Native Tool 扩展,但出现以下错误:
I am trying to debug using chrome. I have added React Native Tool extension in VSCode, but getting error as:
[Error] Error: Unable to find plist file to configure debugging
当我使用 http://localhost:8081/debugger-ui/检查 chrome 时,仍然无法连接调试器.
when I am checking on chrome using http://localhost:8081/debugger-ui/ still not able to connect debugger.
我是本机反应的新手,如果需要有关此问题的更多信息,请提出建议
I am new to react native please suggest if need more information for this issue
推荐答案
引用来自 react-native 站点的第一段,关于 Chrome 调试
Citing the first paragraph from the react-native's site, regarding Chrome Debugging
要在 Chrome 中调试 JavaScript 代码,请选择远程调试 JS";从开发者菜单.这将在 http://localhost:8081/debugger-ui 上打开一个新选项卡.
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
So technically, in the iOS simulator
, you have to cast the following combination ctrl + cmd + z
, and tap on the Debug JS Remotely
field, which will further open the debugger hosted on the following address http://localhost:8081/debugger-ui
作为一种解决方法,在同一个 react-native 站点上,有一个页面解释了如何通过 独立开发者工具,作为npm包
安装.
As an workaround, on the same react-native site, there's a page where is explained how to debug the app via a standalone developer tool, which is installed as an npm package
.
你所要做的就是通过npm
或yarn
安装包(选择你最喜欢的包管理器:])
All you have to do is to install the package through npm
or yarn
(choose the package manager which you like the most :] )
* the same react-native site recommends to install it globally
npm install -g react-devtools
yarn add global react-devtools
安装软件包后,只需在终端中输入以下命令即可打开 devtools
And after installing the package just type in the terminal the following command to open the devtools
react-devtools
这篇关于无法在 mac for iOS 应用程序中连接 React native 中的远程调试器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!