# async-bugs

> Get fuller stack traces in nodejs for async stacks

Latest version **1.1.2** (published 2020-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install async-bugs
pnpm add async-bugs
yarn add async-bugs
bun add async-bugs
```

## 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.1.2 |
| Published | 2020-08-14 |
| First published | 2020-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mark Wylde |
| Maintainers | markwylde |
| Keywords | stacktraces, error, promises, async, await |

## Links

- npm: https://www.npmjs.com/package/async-bugs
- Repository: https://github.com/markwylde/async-bugs
- Homepage: https://github.com/markwylde/async-bugs#readme
- Issues: https://github.com/markwylde/async-bugs/issues
- npm.io page: https://npm.io/package/async-bugs

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [trace](https://npm.io/package/trace.md) ^3.1.1
- [stack-chain](https://npm.io/package/stack-chain.md) ^2.0.0
- [trace-cleaner](https://npm.io/package/trace-cleaner.md) ^1.2.3

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2020-08-14
- 1.1.1 — 2020-08-02
- 1.1.0 — 2020-06-12
- 1.0.2 — 2020-06-12
- 1.0.1 — 2020-06-12

## README

# async-bugs
Create fuller stacktraces, remove all internal lines and gray out modules.

You probably don't want to run this in production. It's great for development and testing, but
in production it will slow your app down a great deal.

## Example Conditional Require
```javascript
if (process.env.NODE_ENV !== 'production') {
  require('async-bugs')
}
```

## Modes
### Normal
The normal mode uses `trace` and `trace-cleaner` to give you stack traces that are organised
and minimised to only the stacks still in scope.

### Verbose
There are some cases the normal mode can not handle. For example if you are doing some crazy
Error extending and it still loses the stack trace. In that case, the verbose mode simple logs
every async call and outputs it on error. It'll be long, but the call should be there.

## Installation
```bash
npm install --save async-bugs
```

## Example Usage
Include in your app:

### Normal
```javascript
require('async-bugs')
```

### Verbose
```javascript
require('async-bugs/verbose')
```

Or add when running node:

### Normal
```bash
node -r async-bugs
```

### Verbose
```bash
node -r async-bugs/verbose
```

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