Firebug不显示我的JavaScript文件 [英] Firebug does not display my JavaScript files

查看:65
本文介绍了Firebug不显示我的JavaScript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在VS2012中使用AngularJS en typescript构建Web应用程序.这些TypeScript文件都被编译成JavaScript文件,并使用Bundles捆绑包发送到客户端(所有选项均已关闭,因此我将单独发送所有文件).

I am building a web application with AngularJS en typescript in VS2012. These TypeScript files are all compiled into JavaScript files and send to the client using Bundles (all options turned off, thus I'm sending all files individually).

在Firebug HTML视图中,我可以看到我的所有JavaScript文件,但是在脚本"标签中,只有我的TypeScript文件可见.我在这里缺少显示我的JavaScript文件的配置吗?我可以添加一个mime类型来为TypeScript文件提供服务,但是然后我就失去了调试能力.

In Firebug HTML view I can see all my JavaScript files, but in the scripts tab, only my TypeScript files are visible. Am I missing a configuration here to display my JavaScript files? I can add a mime type to serve the TypeScript files, but then I loose my debugging powers.

推荐答案

最可能的原因:您正在使用源地图.

Most likely reason: you are using Source Maps.

使用源地图时,浏览器能够显示与已转译的JavaScript代码相关的源代码.

When you use source maps, the browser is able to show the source code that relates to the transpiled JavaScript code.

您可以打开和关闭源映射,因为它是编译器设置.

You can switch source maps on and off as it is a compiler setting.

tsc --sourceMap app.ts

更新

我已经对此进行了测试,它绝对是 源地图.

如果更新编译器设置(或Visual Studio项目中的TypeScript-> Debugging-> Source Maps设置)并删除.map文件,则会在Firefox中看到JavaScript.

If you update your compiler settings (or your TypeScript -> Debugging -> Source Maps setting in your Visual Studio project) and delete your .map files, you'll see the JavaScript in Firefox.

这取决于您的个人喜好-查看实际来源可能有用.

It is down to your individual preferences - seeing the actual source can be useful.

这篇关于Firebug不显示我的JavaScript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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