0.1.1 • Published 10 years ago
js-debug v0.1.1
js-debug
javascript debugging utility
install
npm install --save js-debug
usage
var debug = require('js-debug');
var debugA = debug('debuggerA');
debugA('LogA');
// debuggerA +0ms LogA
var debugB = debug('debuggerB');
setTimeout(function () {
debugB('LogB');
}, 100);
// debuggerB +100ms LogB
debug.json
debug.json
in project's root directory is used to config which debuggers should be printed to the console.
print all:
{
"debug": true
}
print none:
{
"debug": false
}
print debuggerA
:
{
"debug": ["taskA"],
"tasks": {
"taskA": ["debuggerA"]
}
}
print debuggerA
, debuggerB
and debuggerC
:
{
"debug": ["taskA", "taskB"],
"tasks": {
"taskA": ["debuggerA"],
"taskB": ["debuggerB", "debuggerC"]
}
}