Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@midwayjs/debugger

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@midwayjs/debugger

Currency Debug

  • 1.0.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
530
decreased by-37.35%
Maintainers
7
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 30 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc