A Node.js library that provides detailed stack trace analysis with source code context and source map support.
Stackman is a Node.js library that parses error stack traces to provide detailed, contextual information for each frame. It gives developers access to source code context, classifies whether errors occurred in app code, third-party modules, or Node.js core, and supports source maps for transpiled code. It solves the problem of vague stack traces by enriching them with actionable debugging data.
Node.js developers who need to debug complex applications, especially those working with transpiled code (like TypeScript or Babel) or large codebases with many dependencies.
Developers choose Stackman because it provides more detailed and contextual stack traces than Node.js's built-in error handling, including source code previews and source map integration. Its unique selling point is the ability to classify error origins and cache source files for performance, making debugging faster and more precise.
He is like Batman, but for Node.js stack traces
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides extensive information for each call site, including function names and module origins, as detailed in the CallSite API, going beyond standard stack traces.
Retrieves actual source code lines around errors, with configurable line counts, helping developers see the exact code context where issues occur.
Automatically processes source maps to map transpiled code back to original sources, crucial for TypeScript or Babel projects, as highlighted in the features.
Includes LRU caches for source files and source maps to speed up repeated error processing, with tunable options like fileCacheMax and sourceMapCacheMax.
The README warns that accessing error.stack before parsing disables stackman's enhancements, adding a pitfall that can lead to incomplete or incorrect stack traces if overlooked.
Source map errors are silently ignored, which can mask configuration issues or missing maps, making debugging source map problems harder without explicit feedback.
Uses traditional callbacks instead of promises or async/await, making integration with modern asynchronous code more cumbersome and requiring manual wrapping for cleaner syntax.