ECMA-426 Source Map Scopes • Chrome DevTools

Debug Optimized JavaScript as Authored TypeScript

Each example ships minified JavaScript with a hand-crafted scopes source map. Pick an example, follow the steps with DevTools open, and use 🐛 File a bug for anything that looks off.

1. Use Chrome Canary & Enable the Flag Stable Chrome can't parse the current scopes format yet. In Chrome Canary, enable chrome://flags/#devtools-source-map-scopes-in-sources-panel and relaunch.
2. Open an Example Open DevTools, click the example's run button, and work through the steps. Each step lists what DevTools should show.
3. Undock DevTools Put DevTools in its own window (⋮ › Dock side) so the steps and the code stay side by side.

Interactive Debugging Examples

EXAMPLE 01

Variable Renaming, Constant Folding & Binding Expressions

Reconstruct mangled identifiers, folded module constants, complex multi-variable expressions, and eliminated dead variables.

Scope ViewInline Hints & PopoverAutocompleteConditional BreakpointsDebug Evaluate
EXAMPLE 02

Register Reuse & Sub-Range Variable Bindings

Track variable liveness and register coalescing when a single minified variable 'r' is overwritten across multiple stages.

Scope ViewInline Hints & PopoverConditional BreakpointsDebug Evaluate
EXAMPLE 03

Multi-Level Function Inlining & Virtual Call Stacks

Expand a single physical V8 stack frame into 4 authored call frames with per-frame scopes, call sites, and Debug Evaluate.

Call StackScope ViewAutocompleteConditional BreakpointsDebug Evaluate
EXAMPLE 04

Closures & Hidden Compiler Frames

Unpack tuple-compressed closure state (_c[0..3]) across nested scopes while hiding internal compiler trampolines (isHidden: true).

Call StackScope ViewAutocompleteConditional BreakpointsDebug Evaluate
EXAMPLE 05

Logical Stepping Across Inlined & Outlined Functions

Step Over, Into, and Out of inlined helper functions and outlined transpiled blocks while automatically skipping compiler helpers.

Logical Stepping
EXAMPLE 06

Thrown Errors & Symbolized Stack Traces

An error thrown from inlined code inside an outlined block, called through a runtime helper, from an inlined caller. DevTools rebuilds the authored stack trace.

Error Stack TracesCall Stack
EXAMPLE 07

One Function Inlined at Two Call Sites

toCents() is inlined twice into compareOffers(). One authored breakpoint must resolve to both copies, each with its own call site and values.

Call StackConditional Breakpoints
EXAMPLE 08

WebAssembly: Debugging C++ via Scopes & the Wasm Debug Proxy

A hand-assembled wasm module with a scopes source map: inlined C++ helpers, register reuse, structs in linear memory, i64 values and a wasm trap, all shown as authored C++.

Call StackScope ViewConditional BreakpointsLogical SteppingError Stack Traces