Visual Studio 2010 调试器不会在断点处停止?
我在我的计算机(Windows 7 64 位)上使用 Visual Studio 2010 时遇到问题,
我正在为 Outlook 执行 ac# 插件。我可以将其添加到 Outlook 上,尝试一下,但无法调试它,因为调试器不会在断点处停止。我在谷歌和这里搜索了一些相关内容,但没有发现任何对我有帮助的东西。
有人有解决办法吗?
I've problem using visual studio 2010 on my computer (windows 7 64-bits)
I'm doing a c# add-in for outlook. I could add it on outlook, try it, but I couldn't debug it because debugger don't stop at breakpoints. I search something about that on google and here, but I found nothing that help me.
Someone have a solution ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否已将 Visual Studio 连接到 Outlook 进程?
要附加到现有进程,请打开“调试”->“附加到进程...”,
然后您应该能够调试自己的代码。
编辑:
看看 这个。基本上似乎有两种方法可以解决此问题:
将项目启动操作更改为启动项目而不是启动外部应用程序
还有另一种方法该文章中的链接指向 另一篇文章。其中内容相当多,但在底部描述了VS不能同时调试多个框架(如2.0和4.0)。还有一些有关如何解决此问题的说明。
Have you attached Visual Studio to the Outlook process?
To attach to an existing process open Debug->Attach to Process...
Then you should be able to debug your own code.
Edit:
Have a look at this. Basically there seem to be two ways this could be resolved:
Change your project start action to Start Project instead of Start external app
There's another link in that article pointing to another post. In that is quite a lot of stuff, but at the bottom there's descriped that VS can't debug multiple Frameworks at the same time (like 2.0 and 4.0). There are also some descriptions at how to work around this.
我在 Visual Studio 2012 中遇到了同样的问题。
我真的只是将
MessageBox.Show("test");
添加到private void ThisAddIn_Startup(object sender, System.EventArgs e) { }< /code> 并且已经存在的断点被命中。
最初的困难的原因是我第一次遇到异常。线程可能没有完全退出并运行自动生成的finally 和Shutdown 方法。
I experienced this same issue in Visual Studio 2012.
I genuinely literally just added
MessageBox.Show("test");
intoprivate void ThisAddIn_Startup(object sender, System.EventArgs e) { }
and the breakpoints that were already in existence were hit.The cause of the original difficulty was the first time I experience an exception. Potentially the thread didn't exit cleanly and run auto generated finally and Shutdown methods.