# @midwayjs/debugger

> Currency Debug

Latest version **1.0.9** (published 2022-05-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @midwayjs/debugger
pnpm add @midwayjs/debugger
yarn add @midwayjs/debugger
bun add @midwayjs/debugger
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2022-05-30 |
| First published | 2020-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.3.0 |
| Dependencies | 2 |
| Unpacked size | 48.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gao Yang |
| Maintainers | mariodu, czy88840616, legendecas, echosoar, lellansin, lxxyx, stone-jin |
| Keywords | midway, debug |

## Links

- npm: https://www.npmjs.com/package/@midwayjs/debugger
- npm.io page: https://npm.io/package/@midwayjs/debugger

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^7.2.3
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2022-05-30
- 1.0.6 (beta) — 2020-09-15
- 1.0.8 — 2020-12-14
- 1.0.7 — 2020-09-16
- 1.0.5 — 2020-09-15
- 1.0.4 — 2020-08-12
- 1.0.3 — 2020-07-22
- 1.0.2 — 2020-07-22
- 1.0.1 — 2020-07-21
- 1.0.0 — 2020-07-14
- 0.1.0 — 2020-07-14
- 0.0.5 — 2020-04-30
- 0.0.4 — 2020-04-30
- 0.0.3 — 2020-04-01
- 0.0.2 — 2020-04-01
- … 1 more at https://npm.io/package/@midwayjs/debugger/versions

## README

# debugger

通用的 debug 包裹，让一个方法有了单步调试的能力，可以用在 cli 等情况下支持 `--debug` 参数启动单步调试。

### Usage
```sh
npm i @midwayjs/debugger --save
```

```ts
// function.ts
import { debugWrapper } from '@midwayjs/debugger';
export const fun = async (arg1, arg2) => {
  await new Promise(resolve => setTimeout(resolve, 1000));
  return arg1 + arg2;
}

export const wrapFun = debugWrapper({
  file: __filename,           // 要包裹的方法所在文件
  export: 'fun',              // 要包裹的方法的方法名
  debug: process.env.DEBUG    // 是否开启debug，true即开启
});
```

## License

[MIT](http://github.com/midwayjs/debugger/blob/master/LICENSE)

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