Reputation: 2874
I'm currently using the less-rails gem in a Ruby on Rails application that I'm building. I would like some way to debug my Less css files in Chrome by way of source maps (https://developers.google.com/chrome-developer-tools/docs/css-preprocessors) Does anyone know how this can be accomplished?
Upvotes: 13
Views: 505
Reputation: 358
In my opinion, the most convenient way to solve the problem: to abandon the assets pipeline and less-rails. change to gulp or blendid with gulp-less+gulp-less-sourcemap. This will take time to configure, but as my practice shows, the loss of time more than pays off with features like life edit, very fast compilation, and of course - sourcemaps.
In fact, I personally did not use less in such a bundle, but the implementation of sass is very convenient. I think that with less it could be the same
Upvotes: -1
Reputation: 15
You can use pry to debug in rails. So, whereever you are using your css in the haml or html you can write something like -binding.pry( if its haml). Pry is used for debugging ruby code but you can also use it in your haml(view) using -.
Hope this helps.
Upvotes: -3