Hi to all,
I'm new to the Visual Studio Extensions and therefore my apologies if I'm asking something very stupid.
I need to add my own command along with the other default breakpoint commands like "Location...", "Condition...", "Hit Count..." and so on.
Thanks to VSCTPowerToy and EnableVSIPLogging I've discovered that VS shows these commands in three different places: IDM_BREAKPOINT_CONTEXT, IDM_BREAKPOINTS_WINDOW_CONTEXT and IDM_BREAKPOINT_SUBMENU. All of them seem to be parented to IDG_BREAKPOINT_CONTEXT_MODIFY.
I want to directly modify this last one and get the changes applied also to its three sons instead of going to work separately with every son.
Below is my custom vsct, it works but I'm not sure if my implementation is right:
<Commands package="guidMyPkg"><Buttons><Button guid="guidMyCmdSet" id="MyBtnID" priority="0x0000" type="Button"><Parent guid="guidVSDebugGroup" id="IDG_BREAKPOINT_CONTEXT_MODIFY"/><Strings><ButtonText>My command text</ButtonText></Strings></Button></Buttons></Commands>
1- I've read in more places that I should always include a group and that my control should be a son of this group. The group should then be a son of the target VS element. I tried to follow this pattern with the below code, but I only got unexpected behaviours...
<Commands package="guidMyPkg"><Groups><Group guid="guidMyCmdSet" id="MyMenuGroup" priority="0x0000"><Parent guid="guidVSDebugGroup" id="IDG_BREAKPOINT_CONTEXT_MODIFY"/></Group></Groups><Buttons><Button guid="guidMyCmdSet" id="MyBtnID" priority="0x0000" type="Button"><Parent guid="guidMyCmdSet" id="MyMenuGroup"/><Strings><ButtonText>My command text</ButtonText></Strings></Button></Buttons></Commands>
...my button is no more visibile and in order to display it, I have to assign a CommandPlacement for every son of IDG_BREAKPOINT_CONTEXT_MODIFY. In addition to that, since VS recognize a different group, it automatically assigns a line separator (BeginGroup)
which is not what I want.
Therefore, without the creation of a group and the direct connection of my button with the target control, gives me the desired result with less code, but is this really the way to go or I'm doing something that will cause future issues?
2- Is there a way for my button to inherit the visibility/behaviours of the other buttons like "Location...", "Condition..." and so on. I ask this because, apart for the code executed on the click event, for the rest my button acts
exactly in the same way as these buttons.
3 - My initial idea was to add my custom options on "When Hit..." dialog window, but I've deduced that it is not possible to override and customize VS dialog windows and I've decided to directly implement my button linked to my own dialog.
Is that right or I'm missing an important feature that allow to do something similar?
4 - The order of the commands it is configured through the priority field, but I'm not been able to find a priority level schema. I only see hexadecimal numbers as 0x100, 0x0305, 0x0600. It is not straightforward as 0,1,2,3.
Is there an online reference where I can find a table along with the meaning of every available priority number?
5 - Regarding the symbols element, the GuidSymbol/IDSymbol pair is something that it is generated from the compiler by following special patterns or can also be random values entered manually by the programmer?
Thanks to all in advance