Friday, October 23, 2009

How to identify menus and commands with Visual Studio?

Sometimes when we extend the Visual Studio it's very important to know what IDs the menu or command has. Ed Dore published great post Using EnableVSIPLogging to identify menus and commands with VS 2005 + SP1, which describes how to enable VSIP (the old abbreviation of VSX) logging.

To do that all you need is to add(or change) the setting in Windows Registry that informs IDE to enable logging. That is the registry file content for Visual Studio 2005 SP1 or above:

Windows Registry Editor Version 5.00

Similar registry file will work for Visual Studio 2008 as well:

Windows Registry Editor Version 5.00

Once "EnableVSIPLogging" setting is set to 1, you can click on menu or command with CTRL+SHIFT pressed to see the information about clicked item in message box like this:

VSDebug Message box for Format Document toolbar button

Look to Ed Dore's post for more details.

Keep in touch and happy extending!


Cameron Taggart said...

I did not have any luck with this setting in VS 2010 Beta 2. Did anyone else?

VSX Insider said...

As far as know that setting was removed before Beta 2. But it will be added back, and will be in the RC candidate build.

As a work around, you can use the VSCT powertoy and point it to the 10.0_config hive under hkcu\software\microsoft\visualstudio\ to find command IDs.