如何使用浏览器同步进行远程调试? [英] How to do remote debugging with Browser-sync?
问题描述
我已经使用 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://www.wearejh.com/news/browsersync-2-0/
- http://www.sitepoint.com/improve-workflow-browsersync-2-0/
- http://www.wearejh.com/news/browsersync-2-0/
- http://www.sitepoint.com/improve-workflow-browsersync-2-0/
Below are links to articles that talk about Remote Debuggging in Browser-Sync:
这篇关于如何使用浏览器同步进行远程调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!