Source maps and minified code

Trapr maps a minified stack trace back to your original file and line, so an error points at the code you wrote.

Find view: a minified frame mapped to src/cart.ts with the original code
Screenshot: Find view: a minified frame mapped to src/cart.ts with the original code

Production code is usually minified, so a stack frame reads app.min.js:1:607. Find maps it back to the original file and line, for example src/cart.ts:18, and shows the code around it.

How it works

  1. Trapr fetches the script that appears in the stack.
  2. It looks for the source map the script points to: a sourceMappingURL comment, a header, or an inline data URL.
  3. It maps each frame and shows the original code with the mapped stack.

Get the best result

  • Open the Trapr window or side panel so deep capture can read real stack traces.
  • Publish source maps with your build, or serve them to the machines you test on.
  • Without a map, the board shows the top stack frame or the URL instead of a file and line.

Show element

Find can outline the page element related to an issue: the element you clicked right before the error, or the element an accessibility rule flagged.