bootstraponline / async_await_typescript

:trident: ES7 async/await example using TypeScript & node v6 with Visual Studio Code 1.0
12 stars 3 forks source link

Source map support during debugging? #2

Closed lukehoban closed 9 years ago

lukehoban commented 9 years ago

It appears that this doesn't yet support sourcemaps during debugging in Code. Is that right?

The generated await.js.map has: "sourceRoot":"/source/", which appears to be a fake path that is used in node exceptions, though I'm not sure where it's coming from. But this doesn't work during debugging.

bootstraponline commented 9 years ago

Thanks for the bug report. You're correct this doesn't work. I think I'd have to check in a launch.json file and update the Gulpfile to use a valid sourceRoot.

bootstraponline commented 9 years ago

If you clone from master, it should be fixed now.

It's still a bit weird since clicking on the call stack in VSC will look for await.js instead of await.ts

bootstraponline commented 9 years ago

Moving await.js into the ts folder enables clicking on the debugger call stack but Visual Studio Code then proceeds to ignore the source map. I think it's a Visual Studio Code bug.

If there's some way to fix this, let me know. Otherwise I think I have it setup correctly.

bootstraponline commented 9 years ago

Apparently everything has to be at sourceRoot. I pushed a fix to master and now debugging works as expected with both TypeScript and the transpiled file.

lukehoban commented 9 years ago

Great - thanks - this is working for me now.