VS2013 Update 3中无法调试TypeScript文件 [英] Cannot debug TypeScript files in VS2013 Update 3

查看:108
本文介绍了VS2013 Update 3中无法调试TypeScript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2013 Update 3中调试了TypeScript的问题。将不会加载.ts文件的断点。生成相关的.map文件并将其包含在项目中。我已经尝试了关于 Typescript 1.0地图文件不加载的建议甚至在项目属性的TypeScript配置中明确指定.map文件的位置。没有一个工作。

I'm having issues debugging TypeScript in VS2013 Update 3. The breakpoints for the .ts files will not load. The associated .map files are generated and included in the project. I've tried the suggestion on Typescript 1.0 map files do not load and even specifying the location of the .map files explicitly in the TypeScript configuration for the project properties. None of it worked.

运行加载断点时,这似乎不是浏览器问题,无论是各种浏览器。这也排除了GitHub上的这个问题: https://github.com/Microsoft/TypeScript/issues / 556

This doesn't seem to be a browser issue either as none of various browsers when run load the breakpoints. That rules out this issue on GitHub as well: https://github.com/Microsoft/TypeScript/issues/556

我有最新版本的Web Essentials,所以所有组件都是最新的。

I have the most current version of Web Essentials, so all of the components are up to date.

如何让TypeScript调试工作在VS2013中工作?

How do I get TypeScript debugging to work in VS2013?

编辑:只要清楚,我希望通过VSNET 无论浏览器是否调试。意思我想打VSLS断点,无论我选择哪个浏览器启动应用程序(即Chrome,FF,IE等)。

Just to be clear I wish to debug via VSNET regardless of the browser. Meaning I would like to hit the VSNET breakpoints regardless of which ever browser I choose to start the app with (i.e. Chrome, FF, IE, etc.).

推荐答案

这个问题很明显,但我觉得容易被忽视。无法调试最小化的文件。我试图调试的脚本都是在 BundleConfig.cs 类中进行捆绑和分类的。我可以将该分配包放在课堂上,但只是设置它,以便在调试文件不捆绑和分类:

Well the issue is quite obvious but I suppose easily overlooked. One cannot debug minified files. The scripts I was trying to debug were all set up to be bundled and minified in the BundleConfig.cs class. I could leave the bundle assignments in the class, but just set it up so that during debug files are not bundled and minified:

#if (!DEBUG)
    BundleTable.EnableOptimizations = true;
#endif

另一个选项,但您必须记住切换的一个选项是转一起卸载:

Another option, but one you will have to remember to toggle is to turn off minification all together:

BundleTable.EnableOptimizations = false;

这个应该是第1步,当我设置应用程序,但忘记了,没有想到重新检查。现在我绕过了它,调试工作完美。

This really should have been step 1 when I set up the app but had forgotten and didn't think to re-check. Now that I have bypassed it, the debugging works perfectly.

这篇关于VS2013 Update 3中无法调试TypeScript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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