A debug comment -> debugment
MIT License
Embed debug code inside a // @debug
comment that can be toggled from the command line
npm install debugment
A debug comment -> debugment
Simply add debugging code to your program through comments
hello()
function hello () {
// @debug console.log('calling hello')
return 42
}
When running your program these are simply ... comments, but they can be enabled by adding the debugment module.
npm install debugment
node -r debugment example.js // will now print 'calling hello'
The module includes a little CLI helper that does the above for you as well
npm install -g debugment
debugment example.js # same as node -r debugment example.js
MIT