Remotely debugging Chrome Desktop - Firefox Developer Tools 编辑

How to connect the Firefox Developer Tools to the Google Chrome browser running on the desktop.

Note that our support for this depends on the Valence add-on, which bridges the debugging protocol used by Firefox and that used by Chrome. Support for Valence is still experimental.

This guide is split into two parts: the first part, "Prerequisites" covers stuff you only need to do once, while the second part, "Connecting", covers stuff you need to do each time you connect the device.

Prerequisites

You'll need:

Connecting

Running Chrome

To enable remote debugging on Chrome Desktop you need to start it with the following special flag: --remote-debugging-port=9222. See this guide on running Chrome with flags.

There are some other flags that can be helpful. By running with --no-first-run, --no-default-browser-check, and --user-data-dir you can run Chrome alongside another Chrome instance.

For example, on OS X you could run the following command to start a debuggable copy of Chrome that's separate from any other instances you might have running:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=$(mktemp -d -t 'chrome-remote_data_dir')

Connecting using WebIDE

In Firefox, open WebIDE. In WebIDE, click "Select Runtime", and select "Chrome Desktop" from the dropdown menu.

Now click the "Open App" menu in WebIDE. You'll see a list of all the tabs open on the device. Click a tab to attach the developer tools to it. Most of the Firefox Developer Tools should now be available. The following tools are not yet supported:

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:98 次

字数:3437

最后编辑:6年前

编辑次数:0 次

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