Ver versión en español    
 
Home
10 Reasons to use MZ-Tools
MZ-Tools 6.0 for VS.NET
Editions
Features
Online Documentation
MZ-Tools SDK
Download
Purchase
Version History (RSS)  
FAQ & Support
MZ-Tools 3.0 for VB6 & VBA
Features
Online Documentation
Download (freeware)
Donations (Paypal)
Version History (RSS)  
FAQ & Support
User Reviews
Community Place
Contact  
For Add-In Developers
About
   
User Testimonials

I'm an avid supporter of MZ-Tools. It's a product I couldn't do without and your level of support is outstanding.

Jan Hyde (Visual Basic MVP)

You will soon wonder how you ever lived without it.

Andy Maggs

More user reviews
 
HOWTO: Debug add-ins for the macros IDE.

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio .NET 2002
Date: April 2009   Microsoft Visual Studio .NET 2003
      Microsoft Visual Studio 2005
      Microsoft Visual Studio 2008
Introduction

Add-ins can be created for the Visual Studio IDE, but also for the macros IDE ("Tools", "Macros", "Macros IDE"). The process of the Visual Studio IDE is devenv.exe, while the process for the macros IDE is vsaenv.exe.

To debug an add-in for the Visual Studio IDE you can set the devenv.exe executable as the external process to launch on debug. However, the vsaenv.exe executable can't be launched independently and a different approach is needed to debug add-ins loaded in this Macros IDE.

More Information

To debug an add-in for the macros IDE follow these steps:

  • Build the add-in project in "Debug" configuration.
  • Ensure that the build output folder and file are the ones used when registering the add-in. Note: registration of add-ins for the macros IDE is not explained here (the add-in project wizard gives the option to register the add-in for the macros IDE).
  • Ensure that the add-in is not marked to load at startup (at least during the debugging sessions).
  • Set a breakpoint in the OnConnection method of the add-in.
  • In the Debug property page of the add-in project, set the "Start action" setting  to "Start project" (not to "Start external program).
  • Launch by hand a second IDE instance.
  • Open its macros IDE ("Tools", "Macros", "Macros IDE"). At this point the vsaenv.exe process is created.
  • In the first Visual Studio IDE with the add-in project, select the "Tools", "Attach to Process..." menu.
  • Select the vsaenv.exe process in the "Available Processes" list and click the "Attach" button. At this point the add-in project should enter in debug mode.
  • In the Macros IDE of the second Visual Studio instance, go to the "Tools", "Add-In Manager" menu and load your add-in. At this point the breakpoint in the OnConnection method of the add-in project should be hit and you can debug your add-in for the macros IDE.

Go back to the 'Resources for Visual Studio .NET extensibility' section for more articles like this


   Top