摆脱Visual Studio中的[动态] JavaScript视图 [英] Get rid of [dynamic] JavaScript views in Visual Studio

查看:147
本文介绍了摆脱Visual Studio中的[动态] JavaScript视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我在大约2个月前从头开始安装了Visual Studio 2010,所以在调试在IE中运行的JavaScript代码时,它的行为略有不同。




  • 当我设置一个断点时,它会在标题中打开视图的副本[dynamic],并标记断点。

  • 执行时发生JavaScript错误在执行错误代码之前,它会一样。

  • 这个动态视图是可编辑的,但编辑没有任何效果 - 它们没有被保存到文件中。 / li>


我觉得这个行为很不舒服。每次我在调试过程中注意到代码中的错误,我碰巧将其修复到动态视图中。我打了保存。 VS不抱怨接下来我在IE中刷新页面,并且 - bang - 更改丢失,它会再次加载未修改的旧版本。



我无法找出如何我可以把这些看法关掉。在我重新安装Visual Studio之前,它没有这样做。它只会为HTML文件中的内联脚本标签中的脚本创建动态视图。

解决方案

尝试此
IE> Internet选项>设置(浏览历史记录下)>检查存储页面的新版本:每次访问网页时。



这对IE10有效。 / p>



其他选项是打开开发人员工具并选择缓存选项始终从服务器刷新,如下图所示




Since I installed Visual Studio 2010 from scratch about 2 months ago, it behaves slightly different when debugging JavaScript code being run in IE.

  • When I set a breakpoint, it opens a duplicate of the view with the term "[dynamic]" in the header and marks the breakpoint in there.
  • When a JavaScript error happens during execution, it does the same before it marks the line of code that threw the error.
  • This "dynamic" view is editable but edits have no effect - they are not saved to the file.

I find this behavior pretty uncomfortable. Everytime I notice an error in the code during debugging, I happen to fix it in the dynamic view. I hit save. VS does not complain. Next I refresh the page in IE, and - bang - the changes are lost, it loads the untouched old version again.

I haven't been able to find out how I can turn these views off. Before I re-installed Visual Studio it did not do that. It would only create "dynamic" views for script found in inline script tags in HTML files.

解决方案

Try this IE > Internet Options > Settings (under browsing history) > Check for new version of stored pages : Every time I visit the webpage.

This works for me in IE10.

Other option is to open Developer tools and select cache option Always Refresh from Server as show in the image below

这篇关于摆脱Visual Studio中的[动态] JavaScript视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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