[VSTO] Debugging VSTO applications

One very useful trick to debug VSTO applications is this β€œcheeky” flag: VSTO_SUPPRESSDISPLAYALERTS. It’s a environment variable to enable error messages about dodgy exceptions, like COM exceptions. For example, I was getting a strange behavior in my Office Word application when I was trying to add a new Plain Text Control:

However, my VSTO application didn’t show me any messages or warning about any error, until I added this environment variable VSTO_SUPPRESSDISPLAYALERTS to my system with value 0. Next, I got this message:

It means that you can’t set a Plain Text Control title bigger than 64 characters.

Don’t forget this friendly helper πŸ™‚

One thought on “[VSTO] Debugging VSTO applications

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s