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?
Asked
Active
Viewed 478 times
13
-
Not an answer but in case you haven't seen these yet... (1) a gem for source maps with sass [sass-rails-source-maps](https://github.com/vhyza/sass-rails-source-maps) and (2) a gist for an initializer for coffeescript source maps [source_maps.rb](https://gist.github.com/alexspeller/3730452) – John Kacz Jan 29 '16 at 17:25
2 Answers
-1
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

hazg
- 318
- 2
- 10
-3
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.

user907998
- 15
- 2