I am using asp.net 3.5
In web.config, I have debug = false and compilerOptions = "/ debug: pdbonly" to compile with optimization and still get line numbers in my stacks. This works for the most part, but I had an error in the function in my App_Code folder, and the stack trace says that the error was on a line that cannot be an error.
I played around with my web.config settings a bit and found that if I set debug = true and compilerOptions = pdbonly, the stack trace says that the error is the line immediately after the error line. If I remove compilerOptions = pdbonly, the stack trace will report the correct line as an error.
//the actual bug (only reported when debug=true and no compiler options set) var dt = new DateTime(-1,-1,-1); // //...lots of non-buggy code between // //the bug according to the stack trace when // debug=false and compilerOptions="/debug:pdbonly" var ts = TimeSpan.Empty;
Is there any way to make this work right?
source share