faqts : Computers : Programming : Languages : C# : Testing & Debugging

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

21 of 25 people (84%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How do I debug an office add-in from VS.NET?
How do I debug an office add-in from VS.NET?
Why does a new instance of VS.NET start up when I run my office add-in?

Mar 28th, 2002 13:26
Nathan Wallace,


By default when you run office add-in code VS.NET will start a new 
instance of itself for testing the code.  This confused me a lot and 
still doesn't really make sense now that I've worked out how to stop 
it.  Worst of all, debugging and breakpoints don't seem to work when 
it is setup this way.

Basically to run the add-in VS.NET needs to run a program that will 
instantiate the new dll.  It chooses a new instance of itself as the 
way to do this.

To fix this, just click on Properties on your project in the "Solution 
Explorer".  Next click on "Configuration Properties" and 
then "Debugging".

Change the "Start Application" setting from the VS.NET program to the 
office application of your choice.

Now, when you run the project it should fire up that office 
application automatically.  Now debugging and breakpoints should work 
as expected.