Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

33.4. Debugging Office Applications

You can debug Office applications by using much the same process as you would with any other Windows application. All the standard Visual Studio debugger features, such as the ability to insert breakpoints and watch variables, are available when debugging Office applications.

The VSTO runtime, which is responsible for loading add-ins into their host applications, can display any errors that occur during startup in a message box, or write them to a log file. By default these options are disabled, and they can be enabled through environment variables.

To display any errors in a message box, create an environment variable called VSTO_SUPPRESSDISPLAYALERTS and assign it a value of 0. Setting this environment variable to 1, or deleting it altogether, will prevent the errors from being displayed.

To write the errors to a log file, create an environment variable called VSTO_LOGALERTS and assign it a value of 1. The VSTO runtime will create a log file called <manifestname>.manifest.log in the same folder as the application manifest. Setting the environment variable to 0, or deleting it altogether, will stop errors from being logged.

33.4.1. Unregistering an Add-In

When an application-level add-in is compiled in Visual Studio 2008, it will automatically register the add-in to the host application. Visual Studio will not automatically unregister the add-in from your application unless you run Build Clean Solution. Therefore, you may find your add-in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book