You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Putting breakpoint in original code at line // 1 works fine
Setting breakpoint in html at line // 2 and stepping into original code works fine.
In both cases I was stepping into original TypeScript code (not in transpiled JavaScript).
Can you please give more information about the scenario that does not work (or ideally a small repro) so I can make sure that the problem is fixed on TypeScript side?
Activity
guybedford commentedon Jul 30, 2015
Yes, source maps are not currently supported for TypeScript compilation.
mhegazy commentedon Aug 13, 2015
@mfrancis107 and @guybedford is this related to systemjs builder? can you provide more details about your scenario?
guybedford commentedon Aug 13, 2015
@mhegazy thanks so much for checking in here! This is actually both for the in-browser transpilation and for SystemJS builder as well. In-browser transpilation is at https://github.com/ModuleLoader/es6-module-loader/blob/master/src/transpiler.js#L68, and while it shows source maps, they don't provide full debugging in Chrome back to the original source, which we have for the other transpilers.
The builder transpilation is at https://github.com/systemjs/builder/blob/master/compilers/esm.js#L94, and also doesn't have source map support, which would be provided by just returning a source map object at https://github.com/systemjs/builder/blob/master/compilers/esm.js#L105.
Any tips or ideas would be really great to hear here.
guybedford commentedon Aug 13, 2015
To see the in-browser transpilation, open for example https://github.com/systemjs/systemjs/blob/master/test/test-typescript.html, and see that the original ES6 is not present in comparison to others. Looking at the original source it seems like the reason is that the source map looks like:
{"version":3,"file":"es6-circular1.js","sourceRoot":"","sources":["es6-circular1.js"],"names":["p"],"mappings":";;QACW,CAAC,EACD,CAAC;IACZ;QACEA,EAAEA,CAACA,CAACA,CAACA,CAACA;YACJA,eAAAA,CAACA,GAAGA,oBAACA,CAAAA,CAACA;QACRA,IAAIA;YACFA,eAAAA,CAACA,GAAGA,oBAACA,CAAAA,CAACA;IACVA,CAACA;IALD,iBAKC,CAAA;;;;;;;YACD,CAAC,EAAE,CAAC"}Where the
sourcesandfilename are the same. The point is that for in-browser transpilation we have to change the name of the transpiled source tosource.js!transpiledso it can have a separate representation in the debugger, but theload.addressargument provided to transpile at https://github.com/ModuleLoader/es6-module-loader/blob/master/src/transpiler.js#L78 becomes both the sources and file value.mhegazy commentedon Aug 13, 2015
thanks @guybedford for the explanation. I have created microsoft/TypeScript#4301 to track this issue.
also feel free to ping @vladima or myself if you see other issues with the TypeScript/SystemJs interaction in the future. thanks again !
vladima commentedon Aug 13, 2015
@guybedford I've tried to make a simple scenario to repro this issue and it seems to work for me. What I've done:
In both cases I was stepping into original TypeScript code (not in transpiled JavaScript).
Can you please give more information about the scenario that does not work (or ideally a small repro) so I can make sure that the problem is fixed on TypeScript side?
guybedford commentedon Aug 17, 2015
@vladima my apologies you're actually completely right here - this is working completely fine, it was actually just an issue with my tests.