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

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

问题描述

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天全站免登陆