52.6. Debugging

Debugging an add-in may look harder than normal .NET applications because you're developing add-ins with Visual Studio and need to debug them in Visual Studio. So how to work around this?

In Visual Studio there is an option for debugging your projects that involves starting an external program in order to run the project. This option is in the Start Action section in the Debug tab of project properties (Figure 52-13).

Figure 52.13. Figure 52-13

By default, an add-in project is set up to use the Visual Studio IDE to run the output of the project and debug it. So when you choose to debug an add-in project (whether by choosing appropriate menu items or by pressing F5 on the keyboard), the Visual Studio IDE shows up with the add-in enabled for you to test it.

As with any other .NET code, you can insert breakpoints in your code and run the add-in to debug your code, then use some options like visualizers or the watch window to monitor the values of variables, objects, and methods to see what's wrong with your code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.76.138