Add-in debugging works with Word 2003 but not Word 2013

Add-in Express™ Support Service
That's what is more important than anything else

Add-in debugging works with Word 2003 but not Word 2013

Posts: 45
Joined: 2007-05-03

I'm in the situation that I have to update an addin for Word 2013 (It is currently being used in Word 2003).
Unfortunately the addin crashes sometimes which is why I want to debug it.

So I went into the Project Properties and in the Debug tab I chose Word as the external program.
When I use Word 2003 as the program to start the addin with it works just fine. I can use breakpoints and debug the code line by line. However, as soon as I choose Word 2013, it starts as well but I can't debug the addin and the breakpoints I set before become transparent with the message "Breakpoint cannot be reached" or something like that.

Of course I researched the problem for a good while now and there are some things I already did, e.g.:
* Clean up the program
* Rebuild it
* Unregister, register the adx project
* Looked up, where word loads the addin from which is the /bin/Debug folder I am working in (had the problem before that it startet an old version from somewhere else that's why I mention it here)
* Made sure that the configuration in the debug tab in the project properties is set to debug
* Tried to start debugging by attaching to the winword process (same result)

One thing I found interesting is, when I start debugging the project, then go into com-addins in Word, remove and add the addin again, then visual studio reacts by "coloring" the breakpoints again and adds the dll-entries to the modul-view (debug->windows->modules), note: there are no entries in this view of the addin normally although it's working.

Is there something I'm missing out on?
Posted 10 Feb, 2015 05:37:34 Top

Posts: 45
Joined: 2007-05-03
I also found this on this site:

"To help the debugger, you can create (or modify) the .config file(s) for the Office application(s) installed on your PC. You do this using the Host Configuration command of the COM add-in module; create an empty COM add-in project, if required."

How do I use the Host Configuration command?
Posted 10 Feb, 2015 23:59:12 Top

Posts: 45
Joined: 2007-05-03
Ok I was able to find out the solution myself.

I made myself a winword.exe.config file in "C:\Program Files\Microsoft Office\Office15" with this written into the file:

<?xml version="1.0"?>
<supportedRuntime version="v2.0.50727" />

Regards from Austria
Posted 11 Feb, 2015 00:14:20 Top
Andrei Smolin

Add-in Express team

Posts: 17113
Joined: 2006-05-11
Hello Johannes,

Great! Thank you for posting the solution!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Feb, 2015 02:35:29 Top