.net 调试
http://www.cnblogs.com/xzwplus/archive/2008/03/30/1129452.html
需要跟踪调试一些不方便调试的代码时,如windows服务,可在代码中加入如下代码以进入调试:
protected override void OnStart(string[] args){
#if DEBUG
Debugger.Launch(); //Launches and attaches a debugger to the process.
#endif
// TODO: add your initialize code here.
}