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

About Ramon Tebar

Software Engineer specialised on Microsoft Technologies with experience in large projects for different industrial sectors as developer, consultant and architect. I enjoy designing and developing software applications, it is my job and one of my hobbies. I’m interested in design patterns, new technologies and best practices. Making those part of the ALM process is a great challenge. During the last years, I have specialised in Microsoft Dynamics CRM (now Dynamics 365). I customise and extend the platform to provide tailored solutions and integrations based on service-oriented architectures and messages queuing. Motivated by community events and contributor in blogs, technical books, open source projects and forums, I have been awarded Microsoft Most Valuable Professional (MVP) on Dynamics 365 (CRM) since 2012.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: