1.0.0 • Published 5 years ago

debugment v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

debugment

Embed debug code inside a // @debug comment that can be toggled from the command line

npm install debugment

A debug comment -> debugment

Usage

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

License

MIT