开发者

Best practice for crash reporting in C# my application

开发者 https://www.devze.com 2022-12-14 07:23 出处:网络
I need to implement crash reporting framework 开发者_StackOverflow社区on my C#(WPF) application, so i need full call stack,What would you guys suggest for doing this.StackTrace

I need to implement crash reporting framework 开发者_StackOverflow社区on my C#(WPF) application, so i need full call stack,What would you guys suggest for doing this.


StackTrace

        StackTrace st = new StackTrace(true);
        for(int i =0; i< st.FrameCount; i++ )
        {
            // Note that high up the call stack, there is only
            // one stack frame.
            StackFrame sf = st.GetFrame(i);
            Console.WriteLine();
            Console.WriteLine("High up the call stack, Method: {0}",
                sf.GetMethod());

            Console.WriteLine("High up the call stack, Line Number: {0}",
                sf.GetFileLineNumber());
        }
0

精彩评论

暂无评论...
验证码 换一张
取 消