共用方式為


Debugging an Addin in visual studio

Syed Aslam Basha here from the Information Security Tools team.

Most of us have probably done some debugging,  but debugging an Add-in in Visual Studio poses some challenges.

This is how I do it:

  1. Delete all bin and obj files
  2. Copy paste any snk file where it is required
  3. Set appropriate debug type you want for the project
  4. Right click on addins project , set “addin project” as startup project
  5. Right click on “addins project”, select properties and set as shown in the screen shot below
  6. Set Start external program C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
  7. Set Command line arguments /resetaddin addin filename
  8. Set working directory C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
  9. Create folder addins in C:\Users\syed\Documents\Visual Studio 2008\Addins
  10. Copy paste the addin definition file and set the parameter <Assembly> as <Assembly>Path to AddIn.dll</Assembly>
  11. Build solution

At this step you should not be getting any errors.

Launch Visual studio, open your project, set break points and run. One more instance of Visual Studio is launched and as you work with this it would stop at break points and you can debug your addin.

See the screen shots attached.

 

 

DebuggingAddinSettings

-Syed Aslam Basha ( syedab@microsoft.com )

Microsoft Information Security Tools (IST) Team

Test Lead

---------------------------------------------------------

Please leave a comment if the blog post has helped you.

Comments

  • Anonymous
    July 11, 2013
    Worked like a charm for me, thank you :)

  • Anonymous
    April 23, 2014
    Thank you very much! It works also for Visual Studio 2013.

  • Anonymous
    May 09, 2014
    Thanks! Works also for VS 2013 :) (with modified paths)