Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can build, install, run, and debug your add-in from the development environment. Making some changes to the default settings for the add-in project can help debug errors that you may encounter.
To adjust your default settings for add-in projects:
In Solution Explorer, right-click the add-in project, and then click Properties.
On the left side of the Properties dialog box, select Configuration Properties, and then select Debugging below it. Set the Debug Mode to Program and set Start Application to the path for the Microsoft Office Project executable file. The default startup program is Microsoft Visual Studio® .NET, but the add-in can not run in Visual Studio .NET; you must run it in Project because Project is the host application for the add-in.
Build the add-in project and the setup project. For more information, see Compiling and Distributing the Shared Add-In.
In Solution Explorer, right-click the setup project, and then click Install. For a discussion of whether you want to install the add-in for everyone or just yourself, see the Microsoft Knowledge Base article PRB: Visual Studio .NET Shared Add-in Is Not Displayed in Office COM Add-ins Dialog Box (Q316723).
Press F5 to start Project and load the add-in.
Exceptions thrown by your code are trapped by the Project application and will not break into the debugger automatically. To improve the debugging behavior, you can break on exceptions or use try/catch blocks extensively. Be aware that if you break on all exceptions, the debugger may break on exceptions that are not relevant to the application.
To break on exceptions:
- On the Debug menu in Visual Studio .NET, click Exceptions.
- Select the Common Language Runtime Exceptions node.
- In the When the exception is thrown group, select Break into the debugger.
For more information, see Debugging a COM Add-in on MSDN®.