Typescript sourcemaps not loaded in chrome

孤者浪人 提交于 2019-12-12 22:17:30

问题


I've tried debugging typescript code in chrome which has enabled source maps in chrome. But no sourcemap files are loaded as can be seen in the network tab.

I'm using VS2012 and the latest web essentials package.

Any ideas what to do next?


回答1:


You will not see sourcemap files in the network tab. If you go to the Sources tab you will see your typescript files in the list of Sources along the left. From there you can set your breakpoints.




回答2:


If you want to debug inside VS 2012 you only need to set the breakpoint inside VS and use Internet Explorer when debugging.

http://j.mp/10NEXO6

from Say Hello to TypeScript

If you want to debug in Chrome with sourcemaps make sure that:

1.) they are enabled in Chrome (and you said you did that)

http://j.mp/10NFe3w

2.) they are generated by the IDE

You can enable their generation by using Web Essentials addon (check above article for details)

or

manually editing the project file's build step: https://stackoverflow.com/a/12730715/750216

Update:

It seems that at least in VS Express 2012 for Web sourcemaps are generated automatically by default - no settings needed.



来源:https://stackoverflow.com/questions/14159469/typescript-sourcemaps-not-loaded-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!