Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assign keyboard shortcut to Visual Studio 2010 custom macro

I had a macro (http://weblogs.asp.net/koenv/archive/2008/02/14/quick-attach-and-detach-debugger.aspx) in Visual Studio 2008 that attaches the debugger to IIS (for ASP.NET/WCF development). I assigned a shortcut to it using the options dialog.

Now I migrated the macro to Visual Studio 2010 but I can't find the macro in the list of commands to assign a shortcut to it, so apparently my macro is no longer recognized as a command. Strangely the out-of-the-box sample macro's in VS 2010 are in the list.

Anyone knows what I could be doing wrong?

like image 679
Koen Avatar asked Jun 08 '10 12:06

Koen


People also ask

Can we assign a keyboard shortcut to a macro?

On the Design tab, in the Show/Hide group, click Macro Names to display the Macro Name column. In the Macro Name column, press the key or keyboard shortcut to which you want to assign the action or set of actions. In the Action column, add the action that you want the key or keyboard shortcut to perform.

How do I find the shortcut keys in Visual Studio?

Popular keyboard shortcuts for Visual Studio You can look up the shortcut for any command by opening the Options dialog box, expanding the Environment node, and then choosing Keyboard.

How do I change the comment shortcut in Visual Studio?

You can change the shortcut for these commands to whatever you want in Tools -> Options -> Environment -> Keyboard, search for Edit.


1 Answers

My problem when this happened is that the Module name has to match the name in the Macro Explorer.

ie:

Macros
    MyMacros
        Module1
            CollapseTree

has to have the code:

Public Module Module1
    Public Sub CollapseTree()
        'Code Here
    End Sub
End Module
like image 192
Nick Spiers Avatar answered Nov 16 '22 02:11

Nick Spiers