且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Asp.Net MVC 4编译调试

更新时间:2022-11-23 13:28:06

没有列出所有它做的事情,让我们只说这确实很多。具有重要意义的,禁用调试上生成的脚本资源,您可能不希望缓存一些其他的东西浏览器缓存圈。
另外,如果出现异常,将不显示文件的名称,功能在源文件名和行号。
调试=假应该设置一旦你部署项目,以临时服务器或QA服务器,但它应该是调试=真正的你自己的机器上开发免得你碰上关于为什么你改变看不到要体现混乱问题在运行的网站等(高速缓存)或正是一个错误/异常在code发生了。
这里是进入更深的细节什么的调试链接=真正的作用:
调试web.config中= TRUE =坏事?

Without listing all the things it does, lets just say it does a lot. Of significance, disabling debug turns on browser caching of generated script resources and some other things you may not want cached. Also, if an exception occurs it won't display the file name, function name and line number of the file in your source. Debug=false SHOULD be set once you deploy your project to a staging server or QA server but it should be debug=true on your own machine for development lest you run into confusing problems about why changes that you make don't see to be reflected in the running web site etc (caching) or where exactly an error/exception happened in your code. Here is a link that goes into deeper details on what debug=true does: debug=true in web.config = BAD thing?