JavaScript › Debugging, Testing & Tooling
How does source mapping help when debugging minified or transpiled code?
IntermediateAnswer
A source map is a file that maps positions in generated (minified/transpiled) code back to the original source, so browser DevTools can show you readable original code and correct line numbers even though the browser is actually running the bundled output.
//# sourceMappingURL=app.min.js.map
// tells DevTools where to find the mapping fileReal-world example Debugging a production error stack trace that points to original TypeScript source, not the minified bundle.