Community.VisualStudio.Toolkit
Community.VisualStudio.Toolkit copied to clipboard
Tips on adding items to the VS Edit-Advanced Menu and Debug menu
@madskristensen ,
I know that in past episodes on youtube you were struggling on how to add items to the Edit-Advanced menu.
I had to do something similar and also add items to the Debugger menu.
It appears that you were using the incorrect guid.
The Guid for the editor options is guidStdEditor
The Advanced menu is declared as
<Menu guid="guidStdEditor" id="IDM_VS_EDITOR_ADVANCED_MENU" priority="0xFE00" type="Menu">
<Parent guid="guidStdEditor" id="IDG_VS_EDITOR_LANGUAGE_INFO"/>
<Strings>
<ButtonText>Ad&vanced</ButtonText>
<CommandName>Ad&vanced</CommandName>
</Strings>
</Menu>
The group inside this menu is
<Group guid="guidStdEditor" id="IDG_VS_EDITOR_ADVANCED_CMDS" priority="0xFD00">
<Parent guid="guidStdEditor" id="IDM_VS_EDITOR_ADVANCED_MENU"/>
</Group>
You can find this in SharedCmdPlace.vsct
in the VsSdk includes folder.
So to place a button in the Advanced menu you would have to specify
<Parent guid="guidStdEditor" id="IDG_VS_EDITOR_ADVANCED_CMDS"/>
To add menuitems to the Debug menu I had to include VsDbgCmd.h
and vsdebugguids.h
This is how I placed an "XSharp" entry in the Debugger menu:
<!--XSharp Debugger Submenu in Debug/Windows-->
<Menu guid="guidProjectPackage" id="idDebuggerSubMenu" priority="0x100" type="Menu" >
<Parent guid="guidVSDebugGroup" id="IDG_WINDOWS"/>
<CommandFlag>IconAndText</CommandFlag>
<Strings>
<ButtonText>&XSharp</ButtonText>
<CommandName>XSharp</CommandName>
</Strings>
</Menu>
I hope this helps for a future session about adding items to the menu
Robert
It would be great to add those GUIDs to the VSCT project. https://github.com/VsixCommunity/Community.VisualStudio.VSCT