Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Debugging Less in browsers


A key part of developing code of any description is the fixing of any errors or bugs; working with Less code is no exception. We can, of course, do this manually or use a linting tool such as CSS Lint (http://www.csslint.net), but either is likely to require working directly with the compiled CSS code, which will make it harder to trace a fault back to your existing Less code.

Fortunately, we have a couple of options that will help in this respect—we can either debug directly in Firefox using the FireLESS plugin, or we can set up a source map that will translate a compiled style back to the line number in the original Less file. Let's take a look at installing FireLESS first and get ready for when we start developing code in the next chapter.

Debugging the Less code using Firefox

To enable support for debugging Less in Firefox, we first need to ensure that Firebug is installed; for this, you can download it from https://addons.mozilla.org/en-US/firefox/addon/firebug...