5
我使用NLOG这样如何在调试时查看异常?
try
{
// ... some code
}
catch(AException ex)
{
logger.ErrorException(ex.Message, ex);
}
但我想看到的异常调试时。所以我尝试过:
#if !DEBUG
try
{
#endif
// ... some code
#if !DEBUG
}
catch(AException ex)
{
logger.ErrorException(ex.Message, ex);
}
#endif
有没有更好的方法呢?
我不知道你正在尝试做的。 – cadrell0 2012-03-06 13:41:31