If I have an application running on ASP.net and I have debug and stacktrace included in web.config, I get a really good error screen telling me which code was causing the error.
Unfortunately, on a live system where debugging is set to false, the yellow death screen is completely useless, even when stack tracing is turned on, it does not show the line where the error occurred (which seems obvious since there should be no debugging information).
I'm just wondering if there is a way to get good error information without having to include debug = true in the web.config file. This should not be an improvement on the Yellow screen, I can also wrap code that I suspect offended in the try..catch block, but then inside the catch block, is there a way to get the actual code that caused the error?
As you can suspect, this applies to a situation where an error occurs only during the production process and the remote debugger is unavailable :(
Edit: this refers to a “normal” exception, such as a System.ArgumentOutOfRangeException. Logging code attenuation is something I would like to avoid if there is a better way to get more information where the Exception really occurred.