# Stack trace deminifier

- Human page: https://happytails.ai/en/developer-tools/stack-trace-deminifier/
- Markdown: https://happytails.ai/en/developer-tools/stack-trace-deminifier.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/stack-trace-deminifier/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `stack-trace-deminifier` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Source maps are decoded on this device and never uploaded.

### Inputs and settings

Text input: Stack trace and source maps.

Example or placeholder shown in the interface (not a validated fixture):

```text
TypeError: ... at r (app.min.js:1:27)
```

Paste the trace, then each map after a line such as ==> app.min.js.map <==. Up to 400,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `matchAll` | Use the source map for every frame | checkbox | false |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 400,000 characters for the stack trace and maps together, 20 maps and 500 frames. Decoding runs in your browser. Downloads: rewritten stack trace text and JSON report.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "stack-trace-deminifier",
  "category": "developer-tools",
  "built": true,
  "requirements": "Up to 400,000 characters for the stack trace and maps together, 20 maps and 500 frames. Decoding runs in your browser. Downloads: rewritten stack trace text and JSON report.",
  "implementation": {
    "fields": [
      {
        "key": "matchAll",
        "label": "Use the source map for every frame",
        "value": false,
        "type": "checkbox",
        "help": "Only applies when one map is pasted. Leave it off to match maps to frames by file name."
      }
    ],
    "registrationFamily": "project-snapshot-reference",
    "inputMaxLength": 400000,
    "inputErrorCode": "PROJECT_SNAPSHOT_REFERENCE_TOO_LONG",
    "note": "Source maps are decoded on this device and never uploaded.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 400000,
      "inputMode": "text",
      "label": "Stack trace and source maps",
      "placeholder": "TypeError: ... at r (app.min.js:1:27)",
      "help": "Paste the trace, then each map after a line such as ==> app.min.js.map <==. Up to 400,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Turn a minified JavaScript stack trace back into original file names, lines and columns using your source maps.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use Stack trace deminifier

1. Paste the stack trace exactly as it was reported.
2. Add each source map after a line such as ==> app.min.js.map <==.
3. Run the tool.
4. Copy the rewritten stack trace or download the JSON report with every frame.

## Useful next steps

- [Javascript minifier](https://happytails.ai/en/developer-tools/javascript-minifier/) ([Markdown](https://happytails.ai/en/developer-tools/javascript-minifier.md))

- [JSON formatter](https://happytails.ai/en/developer-tools/json-formatter/) ([Markdown](https://happytails.ai/en/developer-tools/json-formatter.md))

- [Regex tester](https://happytails.ai/en/developer-tools/regex-tester/) ([Markdown](https://happytails.ai/en/developer-tools/regex-tester.md))

## What it does

Each frame's file, line and column are looked up in the matching source map, and the frame is rewritten with the original source file and position. Function names are kept as they were reported: a source map records the identifier at each position, which is usually the function being called or the property being read rather than the function the frame runs in, so the JSON report lists that identifier separately. Frames that cannot be resolved, including frames with line 0, stay exactly as they were, with a reason in the report.

### Formats and matching

V8 (Chrome, Edge and Node.js) frames such as at name (file:line:column) and SpiderMonkey or JavaScriptCore frames such as name@file:line:column are recognised. A frame uses the map whose name without .map, or whose file field, matches the frame's file name. Stack columns count from 1 and source map columns from 0; the lookup takes the closest mapping at or before the column on the same line. Source maps follow the version 3 format, including index maps with embedded sections; a position inside a section but before that section's first mapping stays unresolved.

### Limits

A map that belongs to a different build gives wrong positions, so use the map produced with the exact bundle. Maps referenced only by URL are not fetched; paste them instead.
