I\'m deploying a precompiled and all-page-merged website using Web Deployment Projects on Visual Studio 2008. Note that all assemblies and projects have been compiled in Release
From the blog post ASP.Net – Never again fear publishing your website with debug=true:
The article goes on to recommend setting the production server machine.config to ensure retail deployment mode is forced which essentially means debug is always false.