Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.
/ async-bugs Public archive

Get fuller stack traces in nodejs for async stacks

Notifications You must be signed in to change notification settings

markwylde/async-bugs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hazlines has replaced this and handles more scenarios

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

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

npm install --save async-bugs

Example Usage

Include in your app:

Normal

require('async-bugs')

Verbose

require('async-bugs/verbose')

Or add when running node:

Normal

node -r async-bugs

Verbose

node -r async-bugs/verbose

About

Get fuller stack traces in nodejs for async stacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published