Search code examples
visual-studiovisual-studio-extensionsvsix

Add a command to VisualStudio's Debug menu


I want to create a VisualStudio extension that adds a command to the Debug menu. The template contains the following line:

<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>

which adds the button to the tools menu. Sadly I can't figure out how to change that line, so that the button will appear in the Debug menu.

According to this site https://msdn.microsoft.com/en-us/library/cc826118.aspx there is no such thing as a debug menu :-/


Solution

  • I quote from here: Adding a menu item to the Debug menu

    Debug menu does not in the GUID guidSHLMainMenu, but in GUID guidVSDebugGroup. And there is no IDM_VS_MENU_DEBUG ID, replace it with IDM_DEBUG_MENU as following:

    Don't forget to reference VSDbgCmd.h and VsDebugGuids.h in your VSCT.