Skip to content

Async await transformed to ES5 generators not debuggable in Chrome #12390

Closed
@jasonpang

Description

@jasonpang

TypeScript Version: nightly (2.2.0-dev.20161118)

Chrome Version: Stable 54.0.2840.99 (Official Build) m (64-bit) (Revision 7eca4ce1e662f12cadaf96c30cd2335fd03e7140-refs/branch-heads/2840@{#830})

TypeScript Code:

function work() {
  return Promise.resolve(67);
}

async function method() {
  var number = await work();
  console.log(number);
}

debugger; method();

GIF of Issue:

asyncawaitissue

Expected behavior:

Stepping into method() on Chrome should step into the original TypeScript file just a few lines up.

Actual behavior:

Stepping into method() on Chrome steps into the generated ES5 JavaScript file.

Instructions to Reproduce:

  1. Download the self-contained project at my Google Drive link: https://goo.gl/8tmMXh (GitHub did not allow me to upload a .ZIP file).
  2. Open index.html and follow the instructions on-screen.

Possibly related to:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions