其他项目中的Typescript调试ts文件 [英] Typescript debug ts files that are in other project

查看:289
本文介绍了其他项目中的Typescript调试ts文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下情况:


  • 我们要转换为typcript的大型ASP.NET网站

  • 作为解决方案的一部分,typescript作为项目的一部分,但在不同的项目中

  • 每个项目已经将typescript设置为仅一个js文件。

  • 我使用visual studio 2012和typescript 0.9.5

  • A large ASP.NET site that we want to converter to typescript
  • The typescript projects as part of the solution, but in different projects
  • The typescript has been set to one only js file per project.
  • I use visual studio 2012 and typescript 0.9.5

问题是:是否可以直接调试typescript ts文件用这个配置?
如果不可能,我需要修改这样做。
这个项目很大,并不是一个很好的解决方案,将其中的typescript部分放在里面,因为编写Web应用程序的时间很长。

The question is: is it possible to debug directly the typescript ts files with this configuration? If it is not possible what I need to modify to do that. The project is big and it not a good solution to put the typescript part inside it, because the time of compilation of the web application is very long.

谢谢

推荐答案

好的,我发现一个使用独立项目中的typescript(作为C#库)来调试ts的方法。解决方案是将ts文件的地址放在地图文件中。为此,您需要在csproj文件中的适当组DEBUG中放置以下标签。

OK finally I discovered a method to debug ts using the typescript in independent project (as a C# library). The solution was to put the address of the ts files in the map files. to do this, you need to put the following tag in this case in propery group DEBUG in the csproj file.

<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptSourceRoot>http://localhost:37938/</TypeScriptSourceRoot>

地址是库项目的地址。然后,您可以使用Internet Explorer从visual studio 2012进行调试,或者直接使用chrome调试程序。在chrome中,记住在配置调试器中激活地图选项。我正在使用typescript 0.9.5

Where the address is the address of the library project. Then you can debug from visual studio 2012 using internet explorer, or en Chrome directly using the chrome debug. In chrome remember to be active the map option in configuration debugger. I am using typescript 0.9.5

这就是全部。

这篇关于其他项目中的Typescript调试ts文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆