Word VSTO swallows exceptions at runtime without debugging?

I think the problem is isolated only to exceptions around the "add-in user interface" - which happens to be a direct setting found here (Word 2007):

Word Options > Advanced > General > "Show add-in user interface errors"


Actually it is quite easy, set the environmental variable VSTO_SUPPRESSDISPLAYALERTS to 0 before running the office application, then Office will display exceptions and not kill your add-in during startup when there are issues.

There is also a useful powershell script which will do this sort of stuff for you and is handy when figuring out when VSTO not working at http://archive.msdn.microsoft.com/vstotroubleshooter Get started by running vstotroubleshooter.ps1 setdbg which will setup the VSTO_SUPPRESSDISPLAYALERTS env variable for you

Tags:

Ms Word

Vsto