How to get Typescript files to hit breakpoints in the original file, not in Dynamic tab?

风流意气都作罢 提交于 2019-12-25 01:53:05

问题


Before upgrading to Visual Studio Premium 2013 Update 2 RC, when I add a breakpoint in a Typescript file, the breakpoint will hit in the original Typescript file. However, after the upgrade, when the breakpoint hits, a new tab in Visual Studio opens with the title and the code pauses in the dynamic file instead of the original typescript file. How can I make the breakpoints hit in the original Typescript file again? I have marked the typescript file properties to be "Do not copy", so I don't understand why it is being considered as Dynamic? Nothing is being generated on the fly here?


回答1:


Do you see a .map file along w/ a .js file? When you compile your Typescript you need to use the compiler option of -sourcemap

This will create a .map file that VS2013 uses to know how to map the js file to your typescript file.

so in your folder you should see:

  • file.ts
  • file.js
  • file.js.map


来源:https://stackoverflow.com/questions/23067947/how-to-get-typescript-files-to-hit-breakpoints-in-the-original-file-not-in-dyna

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