🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

debugment

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debugment

A debug comment -> debugment

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 25 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts