How to debug

Oct 23, 2011 at 4:48 PM

Hi, very impressive work.

Only question is how to debug my MEF under the framework?



Jan 16, 2012 at 5:58 PM

Sorry about the extremely slow answer. I don't know how it happened but I did not see your question until today.

Anyway. Debugging is easy enough although a bit cumbersome.

First open your MME addin in Visual Studio and generate it in debug mode. Copy the resulting dll and pdb file to wherever they are going to be used. This could be along side another sln file.

Second insert a breakpoint in your addin. Typically in the Click event.

Third open the other sln file from which to test the Addin. You now have two visual studio instances open.

Fourth - from the original VS instance - the one with the addin choose Tools -> Attach To Process  and choose the other VS instance (it will be called devenv.exe).

Now the breakpoint will be hit when you click the menu in the second Visual Studio instance.

As I said. Easy but cumbersome...