Visual Studio 断点无法命中怎么办?

经常远程调试服务器打断点是空心的,很抓狂,正确的方法应该是 

 

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                System.Diagnostics.Debugger.Break();
            }
#endif

然后你用VS附加到远端服务器进程,如果程序运行到该处的时候会自动激活你的VS,不用担心你的小红点问题了!

posted @ 2016-11-25 09:51  白菜89  阅读(1141)  评论(0编辑  收藏  举报