Repro for crbug.com/1319019 (yield source position)

This illustrates the problem with yield break positions being inconsistent.

Steps (plain JavaScript)

  1. Reload this page with DevTools open
  2. Open crbug-1319019-yield-source-position.js in the Sources panel
  3. Set a breakpoint in both line 7 and line 10 by just clicking on the line number in the breakpoint gutter (notice that in both cases the breakpoint is supposedly set on the yield expression)
  4. Click and observe that the debugger pauses on line 7 after calling foo
  5. Now press Resume and observe that the debugger is paused on line 10, but foo was not called yet
  6. Click Resume again and observe that foo is called eventually

Steps (minified TypeScript)

  1. Reload this page with DevTools open
  2. Open crbug-1319019-yield-source-position.ts in the Sources panel
  3. Set a breakpoint in both line 7 and line 10 by just clicking on the line number in the breakpoint gutter (notice that in both cases the breakpoint is supposedly set on the yield expression)
  4. Click and observe that the debugger pauses on line 7 after calling foo
  5. Now press Resume and observe that the debugger is paused on line 10, but foo was not called yet
  6. Click Resume again and observe that foo is called eventually