Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 21. CoffeeScript > Debugging CoffeeScript

Debugging CoffeeScript

One of the criticisms leveled at CoffeeScript is that it is hard to debug. If you just use JavaScript, the process for debugging an error is

1. Get the line number for the error.

2. Edit the code at the line number.

3. Run the code again.

4. Repeat.

For CoffeeScript, the process is as follows:

1. Get the line number for the error.

2. Find the line number in the JavaScript that CoffeeScript compiled. This can be made more difficult if you are not an experienced JavaScript developer as CoffeeScript is opinionated about the JavaScript it creates.

3. Go to the .coffee file and find the CoffeeScript that relates to the JavaScript line number. There is no CoffeeScript line number available.

4. Edit the code in the .coffee file.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint