如何远程调试 vsto Outlook 插件?
我已经构建了一个 Outlook 插件,我想远程调试它在我的开发机器上的虚拟机内运行(虚拟机是 xpsp3 x32 和 Outlook 2010,我的开发机器是 7 x64 和 Outlook 2007)
我有(经过相当长的一段时间后 )有点搞乱用户帐户等)在 vs2010 和虚拟机虚拟机之间进行远程调试。我可以附加到一个简单的测试应用程序并设置断点,然后它们就会被击中。
但是,我似乎无法对 Outlook 插件执行相同的操作。我不能只附加到计算机上运行的 Outlook.exe 进程,因为它似乎不会加载加载项模块,因此断点永远不会被命中。
我不知道如何让 VS2010 从本地构建的项目在远程计算机上启动 Outlook,我尝试按照 这些 msdn 文档,但设置工作目录的说明似乎不起作用,所以如果我按照示例建议设置它并开始调试它出现一条消息,指出该文件夹不存在。
相反,如果我将 Outlook 插件项目的调试属性中的“启动操作”设置为“启动外部程序”并将其指向 Outlook exe,那么 VS2010 将成功启动该应用程序,但是,断点不会被命中,即使看起来如此表明它们已成功设置。
有人成功远程调试 vsto 插件吗?我做错了什么?
I have built an outlook addin, and I'd like to remote debug it running inside a vm on my dev machine (the vm is xpsp3 x32 and outlook 2010, my dev machine is 7 x64 with outlook 2007)
I have (after quite a bit of messing about with user accounts etc) got remote debugging working between vs2010 and the virtual box vm. I can attach to a simple test application and set breakpoints, and they get hit.
However, I can't seem to do the same with the outlook addin. I can't just attach to the outlook.exe process running on the machine as that does not seem to load the addin modules so the breakpoints never get hit.
I can't figure out how to get VS2010 to start outlook on the remote machine from a locally built project, I tried to follow these msdn docs but the instructions to set the working directory don't seem to work, so if I set it as the example suggests and start debugging it comes up with a message saying that the folder does not exist.
If instead I set the Start Action in the debug properties for the outlook addin project to 'Start External Program' and point it at the outlook exe, then VS2010 will successfully start the app, however, the breakpoints are not hit, even though it seems to indicate that they have been successfully set.
Has anyone been successful in remote debugging vsto addins? What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这是一个相当老的问题,但以防万一有人遇到这篇文章,这里有一个解决方案:
在主机上的 VSTO 项目中,将其添加到启动方法的顶部。
将外接程序部署到远程计算机,打开 Outlook,并且 MessageBox 应显示
I know this is quite an old question, but just in case someone comes across this post, here is a solution:
On the host machine, in the VSTO project, add this at the top of the startup method.
Deploy the add in to the remote machine, open Outlook and the MessageBox should display