L
Lord Bah
I've seen some other posts referring to this problem, but didn't find
any solutions.
We're trying to log a call stack when we have a problem, using the
StackTrace and StackFrame classes in C#. They are created via new
StackTrace(true) to get the debugging info and trace.GetFrame(i). Our
classes are all compiled Debug. What we find is, even though the IDE
debugger knows the line numbers of all the methods, when we walk the
stack trace in our code, some of our methods' frames have GetFileName()
returning null and GetFileLineNumber() returning zero. Yet for other
frames it knows both values.
What would prevent these fields from being filled in for an assembly
built Debug?
How does the debugger know the line number when StackTrace doesn't?
any solutions.
We're trying to log a call stack when we have a problem, using the
StackTrace and StackFrame classes in C#. They are created via new
StackTrace(true) to get the debugging info and trace.GetFrame(i). Our
classes are all compiled Debug. What we find is, even though the IDE
debugger knows the line numbers of all the methods, when we walk the
stack trace in our code, some of our methods' frames have GetFileName()
returning null and GetFileLineNumber() returning zero. Yet for other
frames it knows both values.
What would prevent these fields from being filled in for an assembly
built Debug?
How does the debugger know the line number when StackTrace doesn't?