Hi All,
Currently I am working on adding sub Menus to "Debug" main menu of Visual Studio in Isolated Environment (My requirement is that I want to customize "Debug" main menu). I added few custom sub menus under "Debug" main menu.
I removed several sub menus of "Debug" Main Menu like StepInto, StepOver,ClearBreakpoints, ToggleBreakpoint i.e.
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.StepInto:
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.StepOver:
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.ToggleBreakpoint:
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.ClearBreakpoints:
{
prgCmds[0].cmdf = (uint)OLECMDF.OLECMDF_SUPPORTED | (uint)OLECMDF.OLECMDF_INVISIBLE;
return VSConstants.S_OK;
}
also I removed several sub menu's of "Window" sub menu (i.e. Debug - > Windows -> Call Stack ) by uncommenting commands from ApplicationCommands.vsct.
After doing this, I am unable to remove "Export Data Tips", "Clear All data Tips","Import Data Tips", "Options & Settings", I want to remove these 4 commands from "Debug" main menu of Visual Studio.
For removing these 4 commands I tried several things like -
1> Used EnableVsLogging - I found Guid & ID of these 4 commands and used in code like
if (pguidCmdGroup.ToString() == "C9DD4A58-47FB-11D2-83E7-00C04F9902C1" || pguidCmdGroup.ToString() == "1496a755-94de-11d0-8c3f-00c04fc2aae2" || pguidCmdGroup.ToString() == "c9dd4a59-47fb-11d2-83e7-00c04f9902c1")
{
switch (prgCmds[0].cmdID)
{
case (uint)257:
case (uint)800:
case (uint)801:
case (uint)371:
case (uint)1603:
case (uint)1604:
case (uint)1605:
case (uint)333:
{
prgCmds[0].cmdf = (uint)OLECMDF.OLECMDF_SUPPORTED | (uint)OLECMDF.OLECMDF_INVISIBLE;
return VSConstants.S_OK;
}
}
}
Using this I only able to disable the "Options & setting command" (not hide), but "Import Data Tips" is still enable. (Above code is not executing in Isolated Mode for "Export Data Tips", "Clear All data Tips","Import Data Tips" etc)
2> If I did not load Package for Debugger ( from .pkgundef file) then these 4 commands are not visible but If Visual studio didn't load Package for "Debug" then the standard commands under "Debug" Menu like Start Debugging & Output Window (Window -> Output) will be invisible (Because package for this commands aren't loaded) which I don't want.
3> I can invisible these 4 commands in Package.cs using following code
CommandID cmdidDebuggerStopDebugging = new CommandID(iBGuids.guidiBoltPackageCmdSet, iBPkgCmdIDList.cmdidStopDebuging);
OleMenuCommand oleDebuggerStopDebugging = new OleMenuCommand(DebuggerStopDebugging, cmdidDebuggerStopDebugging);
mcs.AddCommand(oleDebuggerStopDebugging);
// Handler
private void DebuggerStopDebugging(object sender, EventArgs e)
{
// Here we can set visiability
}
Here problem is that I didn't get command Id to create commands (in above code - iBPkgCmdIDList.cmdidStopDebuging). So I am unable to use this option.
Can You Please help me to hide the "Export Data Tips", "Clear All data Tips","Import Data Tips", "Options & Settings" commands from "Debug" Main Menu ?
Thanks in advance.
Currently I am working on adding sub Menus to "Debug" main menu of Visual Studio in Isolated Environment (My requirement is that I want to customize "Debug" main menu). I added few custom sub menus under "Debug" main menu.
I removed several sub menus of "Debug" Main Menu like StepInto, StepOver,ClearBreakpoints, ToggleBreakpoint i.e.
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.StepInto:
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.StepOver:
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.ToggleBreakpoint:
case (uint)Microsoft.VisualStudio.VSConstants.VSStd97CmdID.ClearBreakpoints:
{
prgCmds[0].cmdf = (uint)OLECMDF.OLECMDF_SUPPORTED | (uint)OLECMDF.OLECMDF_INVISIBLE;
return VSConstants.S_OK;
}
also I removed several sub menu's of "Window" sub menu (i.e. Debug - > Windows -> Call Stack ) by uncommenting commands from ApplicationCommands.vsct.
After doing this, I am unable to remove "Export Data Tips", "Clear All data Tips","Import Data Tips", "Options & Settings", I want to remove these 4 commands from "Debug" main menu of Visual Studio.
For removing these 4 commands I tried several things like -
1> Used EnableVsLogging - I found Guid & ID of these 4 commands and used in code like
if (pguidCmdGroup.ToString() == "C9DD4A58-47FB-11D2-83E7-00C04F9902C1" || pguidCmdGroup.ToString() == "1496a755-94de-11d0-8c3f-00c04fc2aae2" || pguidCmdGroup.ToString() == "c9dd4a59-47fb-11d2-83e7-00c04f9902c1")
{
switch (prgCmds[0].cmdID)
{
case (uint)257:
case (uint)800:
case (uint)801:
case (uint)371:
case (uint)1603:
case (uint)1604:
case (uint)1605:
case (uint)333:
{
prgCmds[0].cmdf = (uint)OLECMDF.OLECMDF_SUPPORTED | (uint)OLECMDF.OLECMDF_INVISIBLE;
return VSConstants.S_OK;
}
}
}
Using this I only able to disable the "Options & setting command" (not hide), but "Import Data Tips" is still enable. (Above code is not executing in Isolated Mode for "Export Data Tips", "Clear All data Tips","Import Data Tips" etc)
2> If I did not load Package for Debugger ( from .pkgundef file) then these 4 commands are not visible but If Visual studio didn't load Package for "Debug" then the standard commands under "Debug" Menu like Start Debugging & Output Window (Window -> Output) will be invisible (Because package for this commands aren't loaded) which I don't want.
3> I can invisible these 4 commands in Package.cs using following code
CommandID cmdidDebuggerStopDebugging = new CommandID(iBGuids.guidiBoltPackageCmdSet, iBPkgCmdIDList.cmdidStopDebuging);
OleMenuCommand oleDebuggerStopDebugging = new OleMenuCommand(DebuggerStopDebugging, cmdidDebuggerStopDebugging);
mcs.AddCommand(oleDebuggerStopDebugging);
// Handler
private void DebuggerStopDebugging(object sender, EventArgs e)
{
// Here we can set visiability
}
Here problem is that I didn't get command Id to create commands (in above code - iBPkgCmdIDList.cmdidStopDebuging). So I am unable to use this option.
Can You Please help me to hide the "Export Data Tips", "Clear All data Tips","Import Data Tips", "Options & Settings" commands from "Debug" Main Menu ?
Thanks in advance.