是否不可能在Chrome扩展开发工具中使用React Dev工具?

发布于 2025-02-01 18:46:23 字数 287 浏览 4 评论 0原文

  1. 这使工作流程更加困难。有没有办法使用React Dev工具?
  2. 我还经常注意到,扩展开发工具需要一些时间来加载,例如1到2s,因此,它错过了网络请求...是否有办法将其加快?我的意思是,加快开发工作流程的速度,也许让扩展名使用更多内存的方法?前几个请求未在“网络”选项卡中显示,但它们已发送到服务器。

我说的是单击Chrome中的(服务工作者)链接时打开的开发工具:// Extensions/选项卡或打开**时 **和做右键单击>检查

  1. This makes the workflow a lot harder. Is there a way to use react dev tools?
  2. I also notice constantly that the extension dev tools take some time to load, like 1 to 2s, and because of that, it misses network requests... is there a way to speed it up? I mean, speed up the development workflow, maybe some way to let the extension use more memory? the first few requests do not show in the network tab, but they are sent to the server.

I'm talking about the dev tools that open when you click on the (service worker) link in the chrome://extensions/ tab or when you open the **
** and do right click > inspect

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怕倦 2025-02-08 18:46:23

React DevTools的独立版本作品 https://github.com/facebook /react/tree/main/packages/react-devtools

由于您无法加载Localhost的脚本,因此您必须将其包括在扩展名中。

为此,请访问http:// localhost:8097(或在您的React DevTool正在运行的任何地方),将JS保存到Chrome扩展文件夹中的文件中,并在HTML中加上脚本标签。

在发布之前,请务必将其删除。

The standalone version of React Devtools works https://github.com/facebook/react/tree/main/packages/react-devtools

Since you can't load the script from localhost you will have to include it in your extension.

To do that, go to http://localhost:8097 (or wherever your react devtools is running), save the JS to a file in your Chrome extension folder and add that with a script tag to your html.

Be sure to remove it before publishing.

我的奇迹 2025-02-08 18:46:23

我还经常注意到扩展开发工具需要一些时间来加载,例如1到2s,因此,它错过了网络请求...是否有一种方法可以加快速度?

您可以尝试使用隐身模式。不会使用扩展。因此,它不会影响您的网络请求。

I also notice constantly that the extension dev tools take some time to load, like 1 to 2s, and because of that, it misses network requests... is there a way to speed it up?

You can try to use the Incognito Mode. There will be no extensions used. So, it will not affect your network requests.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文