npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

debugment

1.0.0

@mafintosh

npmHomeRepoSnykSocket
Downloads:66
$ npm install debugment
DailyWeeklyMonthlyYearly

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