So, I am writing a Office 2010 Add-In. I have the code working and running, but would like to step through a section of code. I've added the break point and hit debug. Word starts up with the add-in loaded. This what I see in the debug window:
'WINWORD.EXE' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll' The program '[3280] WINWORD.EXE: Managed (v4.0.30319)' has exited with code -1073740791 (0xc0000409).
I can interact with the add-in (Custom Ribbon), but the code never stops on the break point. I've been scouring the web and trying multiple things, but can't seem to get it to work.
Thoughts?
I don't know why it thinks the process has ended--I've never worked with debugging Office add-in's--but, in case their's no other option, you can always resort to adding a Debugger.Break()
call to your code. That will force the process, when it hits that line, to bring up your debugger and let you trace through the already running process. You have to be careful to remove the line, though, before you compile a release version of your assembly.
User contributions licensed under CC BY-SA 3.0