星空网 > 软件开发 > ASP.net

记录调试树(方便跟到具体的调用)

   public static void DebugFunctionTree(string message)
        {
            try
            {
                System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace();
                System.Diagnostics.StackFrame[] sfs = st.GetFrames();
                StringBuilder sb = new StringBuilder();
                for (int u = 1; u < sfs.Length; ++u)
                {
                    System.Reflection.MethodBase mb = sfs[u].GetMethod();
                    string pms = string.Empty;
                    foreach (var p in mb.GetParameters())
                    {
 
                        pms += p.ParameterType.FullName + ":" + p.Name + ",";
                    }
                    sb.AppendLine(string.Format("[方法调用树][{0}]: {1}.{2} 参数:{3}", u, mb.DeclaringType.FullName, mb.Name, pms));
                }
                XX.General.Exception.Debug(message+"-开始");
                XX.General.Exception.Debug(sb.ToString());
                XX.General.Exception.Debug(message + "-结束");
            }
            catch (Exception)
            {
                
            }       

        }




原标题:记录调试树(方便跟到具体的调用)

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

国际物流澳大利亚:https://www.goluckyvip.com/tag/101704.html
17track国际快递查询网:https://www.goluckyvip.com/tag/101705.html
达国际快递:https://www.goluckyvip.com/tag/101706.html
广州速达国际货运:https://www.goluckyvip.com/tag/101707.html
广州赛拉国际货运:https://www.goluckyvip.com/tag/101708.html
刀具寄国际快运:https://www.goluckyvip.com/tag/101709.html
卓欧毕雪酒店推荐:https://www.vstour.cn/a/404237.html
响沙湾门票套票价格大介绍(省钱攻略必备):https://www.vstour.cn/a/404238.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流