How to do remote debugging with Browser-sync?

不羁岁月 提交于 2019-12-05 20:54:21

问题


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

how can I remote debug that?


回答1:


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.

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

npm install -g browser-sync@latest

Then run any command like you would.
eg:

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

To open this Web UI open

http://localhost:3001

Below are links to articles that talk about Remote Debuggging in Browser-Sync:
  • http://www.wearejh.com/news/browsersync-2-0/
  • http://www.sitepoint.com/improve-workflow-browsersync-2-0/



来源:https://stackoverflow.com/questions/28470601/how-to-do-remote-debugging-with-browser-sync

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!