# debugment

> A debug comment -> debugment

Latest version **1.0.0** (published 2019-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install debugment
pnpm add debugment
yarn add debugment
bun add debugment
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-06-25 |
| First published | 2019-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 92 |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/debugment
- Repository: https://github.com/mafintosh/debugment
- Issues: https://github.com/mafintosh/debugment/issues
- npm.io page: https://npm.io/package/debugment

## Recent versions

- 1.0.0 (latest) — 2019-06-25

## README

# 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

``` js
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.

```sh
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

```sh
npm install -g debugment
debugment example.js # same as node -r debugment example.js
```

## License

MIT

---
_Source: https://npm.io/package/debugment · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
