如何使用浏览器同步进行远程调试? [英] How to do remote debugging with Browser-sync?

查看:63
本文介绍了如何使用浏览器同步进行远程调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 npm 安装了浏览器同步.在他们的网站上,他们提到它还允许远程调试.但是他们没有提到如何进行远程调试.我使用以下命令在浏览器同步上运行 mysite.浏览器同步启动 --proxy localhost:8080/mysite

I have installed browser sync with npm. On their website, they have mentioned that it also allows remote debugging. But they have not mentioned that how to do remote debugging. I have used below command to run mysite on browser-sync. browser-sync start --proxy localhost:8080/mysite

如何远程调试?

推荐答案

虽然这在 Browser-sync 2.0 之前的版本中是一个相当棘手的过程,但是在 Browser-sync 2.0 中,您现在拥有一个全新的 Web UI,这使得整个过程更容易.

Though this was quite a tricky process in versions before Browser-sync 2.0, but with Browser-sync 2.0 you now have a brand new Web UI, which makes this process a whole lot easier.

首先您需要将 Browser-sync 更新到最新版本

Firstly you need to update Browser-sync to it's latest version

npm install -g browser-sync@latest

npm install -g browser-sync@latest

然后像您一样运行任何命令.
例如:

Then run any command like you would.
eg:

浏览器同步开始 --proxy "myproject.dev" --files "css/*.css"

browser-sync start --proxy "myproject.dev" --files "css/*.css"

要打开此 Web UI 打开

To open this Web UI open

http://localhost:3001

以下是讨论浏览器同步中远程调试的文章链接:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆