Visual Studio - I want “Go To Definition” to open Object Browser, not “metadata”

后端 未结 4 789
后悔当初
后悔当初 2021-02-04 05:05

In Visual Studio version 2002 and 2003 \"Go To Definition\" would find the selected type or member in the Object Browser. In 2005 onwards it opens a source window \"generated fr

4条回答
  •  情深已故
    2021-02-04 05:39

    As workaround you can create the following macro:

    Sub GoToDefinitionUsingObjectBrowser()
        DTE.ExecuteCommand("Edit.SelectCurrentWord")
        DTE.ExecuteCommand("View.ObjectBrowser")
        DTE.ExecuteCommand("View.ObjectBrowserSearch", DTE.ActiveDocument.Selection.Text)
    End Sub
    

    Then go to Tools/Options/Keyboard and assign hot key for this macro.

    Tested in Visual Studio 2010.

提交回复
热议问题