我在代码的最后一行设置了一个断点。断点被禁用。为什么?看起来代码被某些条件排除在外。TraceSource 的构造函数有效,我可以验证对象是否正常并且所有侦听器都正常。它看起来真的很奇怪。我停在 int a=1; 然后调试器通过忽略它来跳过 TraceInformation。配置为调试 x86。
public TraceSource _fixTraceSource;
_fixTraceSource = new TraceSource(_configSection.TraceSourceName);
int a = 1; // dummy line to set breakpoint
_fixTraceSource.TraceInformation("FIX -> toAdmin Message: {0}", message.ToString());