# stacktracejs/stacktrace.js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/stacktracejs-stacktrace-js).**

4,005 stars · 279 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/stacktracejs/stacktrace.js
- Homepage: https://www.stacktracejs.com/
- awesome-repositories: https://awesome-repositories.com/repository/stacktracejs-stacktrace-js.md

## Topics

`error-handling` `javascript` `stacktracejs`

## Description

stacktrace.js is a JavaScript library designed for generating and parsing detailed function call stacks from error objects across different web browsers. It functions as a stack trace parser and error instrumentation utility that captures execution flow and error traces.

The project differentiates itself through its ability to resolve source maps, translating minified JavaScript stack traces back to original source lines. It also includes a remote error reporter for transmitting processed exception data and stack traces to a centralized server for analysis.

The library covers broad capability areas including error trace extraction, structured trace generation, and function call instrumentation. It utilizes environment-specific parsing to normalize diverse browser error formats into a uniform object model.

## Tags

### Software Engineering & Architecture

- [JavaScript Error Trackers](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/error-management/runtime-error-trackers/javascript-error-trackers.md) — Captures and analyzes function call stacks to identify the exact location of JavaScript errors in the browser.
- [Function Wrapping Instrumentation](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/error-management/runtime-error-trackers/javascript-error-trackers/function-wrapping-instrumentation.md) — Provides a utility for wrapping functions to automatically capture and report execution flow and error traces.
- [Uniform Error Objects](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/error-object-creation/uniform-error-objects.md) — Converts diverse browser error formats into a uniform object model for consistent analysis.
- [Client-Side Error Posting](https://awesome-repositories.com/f/software-engineering-architecture/remote-error-handling-utilities/client-side-error-posting.md) — Collects detailed error traces from user browsers and transmits them to a remote server for analysis.
- [Source Map Resolution](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/source-map-resolution.md) — Translates minified JavaScript stack traces back to original source lines using source map files.
- [Stack Trace Generation](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/stack-trace-generation.md) — Captures the current function call stack and utilizes source maps to resolve minified code. ([source](https://cdn.jsdelivr.net/gh/stacktracejs/stacktrace.js@master/README.md))
- [Higher-Order Function Wrapping](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping.md) — Wraps target functions in a proxy to intercept calls and trigger stack capture during execution.
- [Remote Stack Trace Transmission](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/stack-trace-generation/stack-trace-serializers/remote-stack-trace-transmission.md) — Serializes processed stack data for transmission to a centralized debugging server.

### Development Tools & Productivity

- [Stack Trace Capture](https://awesome-repositories.com/f/development-tools-productivity/custom-component-wrapping/error-boundary-wrappers/stack-trace-capture.md) — Generates detailed lists of function calls from error objects or specific execution points. ([source](https://www.stacktracejs.com/))
- [Source Map Resolution](https://awesome-repositories.com/f/development-tools-productivity/source-code-mapping/source-map-resolution.md) — Translates minified line and column numbers back to original source code using external mapping files.
- [Stack Trace Libraries](https://awesome-repositories.com/f/development-tools-productivity/stack-trace-libraries.md) — Provides a comprehensive library for generating and parsing detailed function call stacks from error objects.
- [Browser Engine Parsers](https://awesome-repositories.com/f/development-tools-productivity/browser-engine-parsers.md) — Implements different parsing logic to handle varying stack trace formats across different browser engines.
- [Code Execution Profilers](https://awesome-repositories.com/f/development-tools-productivity/code-execution-profilers.md) — Tracks function call sequences and execution flows to analyze how specific code is being invoked.
- [Regex-Based Output Parsing](https://awesome-repositories.com/f/development-tools-productivity/regex-based-output-parsing.md) — Uses regular expressions to extract structured call data from raw browser error strings.

### System Administration & Monitoring

- [Error Trace Extraction](https://awesome-repositories.com/f/system-administration-monitoring/observability-tracing/step-level-tracing/error-aware-step-tracing/error-trace-extraction.md) — Converts standard error objects into structured call lists to analyze exception locations. ([source](https://cdn.jsdelivr.net/gh/stacktracejs/stacktrace.js@master/README.md))
- [Error Reporting](https://awesome-repositories.com/f/system-administration-monitoring/error-reporting.md) — Sends processed JavaScript stack traces and exception data to a remote server for debugging.
- [Runtime Function Instrumentation](https://awesome-repositories.com/f/system-administration-monitoring/runtime-function-instrumentation.md) — Wraps target functions to automatically capture and process a stack trace upon every invocation. ([source](https://cdn.jsdelivr.net/gh/stacktracejs/stacktrace.js@master/README.md))
