It seems that with the latest angular2 npm package there is no way to debug typescript sources. Existing https://stackoverflow.com/a/126807/ and the article on average are deprecated. I created a github question , please support it.
There are two problems:
Sources
1) typescript are no longer hardcoded as URIs of data inside the source maps, but actually point to some non-existent place in npm (this is actually the location in the sources of the angular git hub), but not something inside the npm package):
{ "version":3, "file":"application_ref.js", "sourceRoot":"", "sources":["../../../../modules/@angular/core/src/application_ref.ts"] <-------
I found out that this path has nothing to do with it, since angular sources are compiled using the --inlineSources parameter, so the *.map files contain the sourcesContent key with the source content inside. So this is no longer a problem. But the second problem remains.
2) Even if I just copy the modules folder from github sources, the second problem arises: the js files in the npm package are compiled into the es6 module es6 , which is not yet supported in browsers, and a bootloader like SystemJS requires tracing. For example, common/index.j :
export { NgLocalization, CommonModule, NgClass, NgFor, NgIf, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, VERSION, Version, PlatformLocation, LocationStrategy, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, Location } from './src/common';
But I canβt use traceur , as it is likely to break the existing source maps created for js files transferred using tsc .