Skip to content

mafintosh/debugment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A debug comment -> debugment

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published