[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 🙂

Advertisements

Posted on March 2, 2010, in VSTO. Bookmark the permalink. 1 Comment.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: