1.0.9 • Published 2 years ago

@midwayjs/debugger v1.0.9

Weekly downloads
763
License
MIT
Repository
-
Last release
2 years ago

debugger

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

Usage

npm i @midwayjs/debugger --save
// 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

1.0.9

2 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago