When I create a StackTrace
object with parameter bool fNeedFileInfo = true
, I get the file names and line numbers from my own code. But for a deeper analysis of a Winforms project I also need the file names and line numbers of the .net code.
I already configured VS 2015 to allow stepping into .net source code and I can see the needed info in the Stack Frame dropdown field of Visual Studio, but I cannot get this info programmatically in my code for debug output.
Is there a way to programmatically query the .net code file names and line numbers of a stack frame?