How to debug LESS in Chrome?

后端 未结 3 1704
误落风尘
误落风尘 2021-02-20 03:10

It looks as though LESS debugging has come a decent distance since even a year ago, and I was wondering how many people have experience with debugging using developer tools in C

3条回答
  •  独厮守ぢ
    2021-02-20 03:49

    This is now working perfectly fine with less.js 1.5b4 and Chrome 30.0.1599.69

    Basically, you need to make sure lessc generates valid source map url at the end of your css file:

    /*# sourceMappingURL=/templates/lwks/css/template.css.map */
    

    and that the .css.map file is being loaded by the browser. If this is still for some reason not working for you, in check chrome://flags Enable Developer Tools experiments is on

    enter image description here

    more details here: https://github.com/less/less.js/issues/1050

提交回复
热议问题