Repros for <value unavailable> (crbug/1328681)

This illustrates the different reasons for the debugger being unable to access the value of a variable (in the context of goo.gle/devtools-value-unavailable).

Steps to reproduce the Temporal Dead Zone (TDZ)

  1. Open DevTools.
  2. Click .
  3. Now DevTools should stop on the debugger statement in tdz().
  4. The Scope view in the Sources panel should show both x and y as <value unavailable>, since execution stopped in the TDZ for these variables.

Steps to reproduce the optimized out values in TurboFan

  1. Open DevTools.
  2. Click .
  3. Now DevTools should stop on the debugger statement in optimizedOut().
  4. The Scope view in the Sources panel should show y as <value unavailable>, since TurboFan doesn't need to keep the value of y alive beyond the debugger statement.

Steps to reproduce the missing closued over variables

  1. Open DevTools.
  2. Click .
  3. Now DevTools should stop on the debugger statement in inner().
  4. The Scope view in the Sources panel should show y as <value unavailable>, since it's closed over but not needed for inner.