asp.net webform 动态调试技巧
<script runat="server"> protected void TextBox1_TextChanged(object sender, EventArgs e) { Trace.Warn("TextBox1_TextChanged"); } </script>
<script runat="server"> protected override void OnPreInit(EventArgs e) { AppDomain.CurrentDomain.FirstChanceException += new EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>(CurrentDomain_FirstChanceException); base.OnPreInit(e); } void CurrentDomain_FirstChanceException(object sender, System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs e) { log4net.ILog log = log4net.LogManager.GetLogger(this.GetType()); log.Error("FirstChanceException", e.Exception); } </script>
桂棹兮兰桨,击空明兮溯流光。