Giter Club home page Giter Club logo

coffee-trace's Introduction

Coffee-Trace

makes debugging coffee-script easier by displaying corresponding lines of code in the stack-trace with style

Coffee-Trace

About Coffee-Trace

Coffee-Trace makes debugging coffeescript code easier by attempting to point corresponding coffeescript code and line numbers and styling the stacktrace a little bit.

Example

Running this..

require('coffee-trace')

test = ->
  people =
    john:
      first_name: 'john'
      last_name: 'doe'
    mary:
      first_name: 'mary'
      last_name: 'jane'

  console.log("Welcome", people[p].first_name, people[p].last_name, "!!!") for p in ['john', 'mary', 'josh']

process.nextTick test

will result in this: Coffee-Trace

Why?

If you love Coffee-Script and Node.js, you will provably also be frustrated by the challenges of quickly finding and debugging the coffeescript line corresponding to the one pointed out by the stack-trace.

I've been searching a cleaner solution myself, and have found some very useful links and discussions, but am yet unsatisfied. So, while SourceMaps implementation in Coffee-Script is a reality, this is the least I can do.

Install and Usage

Become a masochist by enjoying uncaughtExceptions and crashes. Just by installing with:

npm install coffee-trace

and at the very beginning of your code:

require('coffee-trace')

Utopic Future (High Hopes)

  • Testing ( make something crash the way expected )
  • Beautify and comment code

coffee-trace's People

Contributors

xenomuta avatar

Watchers

Naoya Tsutsumi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.