Debugging ASP.NET MVC 4 Compilation
What's the difference between:
-
<compilation debug="true" />
(defaults to VS 2013 web.config in debug mode) -
<compilation debug="false" />
-
<compilation />
(defaults to VS 2013 web.config version)
Now concatenation and minification are always enabled BundleTable.EnableOptimizations = true;
, so I'm wondering why using this element and why the value is false
not the default in release mode.
source to share
Without listing everything he does, let's just say that he does a lot. It's important to note that disabling debugging enables browser caching of generated script resources and some other things that you might not want to cache. Also, if an exception is thrown, it will not display the file name, function name and line number of the file in your source. Debug = false SHOULD be installed after deploying your project to a staging or QA server, but it should be debug = true on your own development machine so you don't get confused about why the changes you make are not showing up on the running web -site, etc. (caching) or where exactly the error / exception happened in your code. Here is a link that has more details on what debug = true does: debug = true in web.config = BAD thing?
source to share