
A production stack trace takes you to the right TypeScript line. Then you pause on it and discover that the local variables have one-letter names. Chrome’s November 13 DevTools update describes support for source map scope information across the Sources panel, stack traces and expression evaluation. With a build that supplies these details, a developer can ask for an authored variable by name while the browser executes optimized JavaScript. Chrome DevTools’ November 13 release summary.
Understand what the extra data buys you
A source map can connect a position in a generated bundle to a position in the original file. That is already enough to make many errors easier to locate. Scope information adds context about variables, their visibility and the functions that logically own them. Chrome can use that data to reconstruct the original scope tree and account for some functions a compiler inlined or moved into helpers. Chrome’s description of original scopes and stepping.
Suppose a checkout summary applies a discount twice only in its optimized build. The original function calls its two inputs listPrice and discountedPrice. Finding the original line helps. Being able to inspect those two values by name after the first calculation lets an engineer tell whether the bad value entered the function or was produced inside it.
Test with the same bundle you will investigate
Build a production-style candidate from a known revision. Keep its generated script and corresponding source map together, and serve the candidate in a test environment. Verify JavaScript source maps are enabled in DevTools. Set a breakpoint in the authored file immediately after the discount calculation and reproduce it with a fixed input, such as a price of 80 and a single discount of 10. Chrome’s source map setup and debugging guide.
First verify that the breakpoint lands on the expected statement. Then inspect the Scope pane and add a watch for the original variable name. If the filename is correct but the local still appears as a minified identifier, investigate whether the build tools actually emit scope information and whether every transformation preserved it. A successful map download alone cannot answer those questions.
Give the next engineer a reproducible report
Record the exact bundle identifier or hash, the browser version, the source-map producer and the original inputs. Include the two values you observed and the first frame in your own code where they diverged. Those details let another developer repeat the diagnosis even after a new build changes every minified symbol. They also distinguish an application arithmetic error from a map that belongs to an older deployment.
