How to debug LESS in Chrome?

后端 未结 3 1657
误落风尘
误落风尘 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:42

    Blog post author here...I've gone back and updated my post so it now works with regular Chrome 26. Just checked in Canary and it doesn't seem to work anymore. So Chrome 24 - 26 are good but Canary is busted.

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2021-02-20 03:56

    I think that the issues that you refer are not related.

    As far as I understand you compile your LESS file on the server side and all you want to do is to retrieve the new css file and not the cached one? Am I right?

    Did you tried disable cache on google chrome?

    0 讨论(0)
提交回复
热议问题