edebug

0.1.8 • Public • Published

edebug

tiny node.js debugging utility modelled after node core's debugging technique.

Installation

$ npm install edebug

Usage

With edebug you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated console.err, so all of the console format string goodies you're used to work fine. A unique color is selected per-function for visibility.

Example app.js:

var edebug = require('edebug');
edebug.info('Hello World');
edebug.info('Hello World', true);

debug http and worker

edebug.err('Hello World');
edebug.err('Hello World', true);

debug http and worker

edebug.war('Hello World');
edebug.war('Hello World', true);

debug http and worker

edebug.suc('Hello World');
edebug.suc('Hello World', true);

debug http and worker

edebug.data('Hello World');
edebug.data('Hello World', true);

debug http and worker

var mjson = {
   "glossary": {
       "title": "example glossary",
   	"GlossDiv": {
           "title": "S",
   		"GlossList": {
               "GlossEntry": {
                   "ID": "SGML",
   				"SortAs": "SGML",
   				"GlossTerm": "Standard Generalized Markup Language",
   				"Acronym": "SGML",
   				"Abbrev": "ISO 8879:1986",
   				"GlossDef": {
                       "para": "A meta-markup language, used to create markup languages such as DocBook.",
   					"GlossSeeAlso": ["GML", "XML"]
                   },
   				"GlossSee": "markup"
               }
           }
       }
   }
}
edebug.json(mjson);

debug http and worker

 edebug.disable();
edebug.info('Hello World');
edebug.info('Hello World', true);
 edebug.enable();
edebug.info('Hello World');
edebug.info('Hello World', true);

debug http and worker

debug http and worker

Authors

  • Tarik

Readme

Keywords

Package Sidebar

Install

npm i edebug

Weekly Downloads

0

Version

0.1.8

License

MIT

Last publish

Collaborators

  • tarik