首页 > 解决方案 > 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 :-/

标签: visual-studiovisual-studio-extensionsvsix

解决方案


我从这里引用:向调试菜单添加一个菜单项

Debug 菜单不在 GUID guidSHLMainMenu 中,而是在 GUID guidVSDebugGroup 中。并且没有 IDM_VS_MENU_DEBUG ID,将其替换为 IDM_DEBUG_MENU 如下:

不要忘记在您的 VSCT 中引用 VSDbgCmd.h 和 VsDebugGuids.h。


推荐阅读