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 b开发者_如何转开发een successful in remote debugging vsto addins? What am I doing wrong?
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.
MessageBox.Show("Debug");
Deploy the add in to the remote machine, open Outlook and the MessageBox should display
- Run the Visual Studio Remote Debugging Monitor on the remote machine
- On the host machine, set a breakpoint on the line after the MessageBox
- In Visual Studio, select Debug/Attach to Process from the menu and attach to the Outlook process running on the remote machine
- On the remote machine, click on the OK button on the MessageBox you added in step 1
- The breakpoint you set in step 5 will now be hit
精彩评论