See more about these commands in the Find code using Go To commands topic. Go To Last Edit Location ( Ctrl+ Shift+ Backspace)
Go To Next Issue in File ( Alt+ PgDn) and Go To Previous Issue in File ( Alt+ PgUp) In Visual Studio 2017 version 15.8 and later, the following Go To navigation commands are also available: Go To Symbol ( Ctrl+ 1, Ctrl+ S): Move to the specified symbol in the solution. Go To Member ( Ctrl+ 1, Ctrl+ M): Move to the specified member in the solution. Go To Type ( Ctrl+ 1, Ctrl+ T): Move to the specified type in the solution. Go To Recent File ( Ctrl+ 1, Ctrl+ R): Move to the specified, recently visited file in the solution. Go To File ( Ctrl+ 1, Ctrl+ F): Move to the specified file in the solution. Go To All ( Ctrl+ T or Ctrl+ ,): Move to the specified line, type, file, member, or symbol. Go To Line ( Ctrl+ G): Move to the specified line number in the active document. Go To has the following commands, which are available in the Edit menu under Go To: You can change the highlighting color in Tools > Options > Environment > Fonts and Colors > Highlighted Reference. To move to the next or the previous highlighted symbol, press Ctrl+ Shift+ Down Arrow or Ctrl+ Shift+ Up Arrow. In Visual Basic code, keywords for many control structures are also highlighted. These include the names of classes, objects, variables, methods, and properties. The highlighted symbols may include declarations and references, and many other symbols that Find All References would return.
When you click a symbol in the source code, all instances of that symbol are highlighted in the document. Select Find All References from the right-click menu Place your text cursor somewhere inside the type name, and press Shift+ F12 For more information, see Find references in your code. You can use this to check possible side-effects of a large refactoring, or to verify "dead" code. Find all referencesįinds all the references to the selected element in the solution. To hide the navigation bar, change the Navigation bar option in the Text Editor All Languages settings ( Tools > Options > Text Editor > All Languages), or you can change the settings for individual languages. To return focus from the navigation bar to the code without selecting anything, press the Esc key. To select the navigation bar item that has focus and return to the code window, press the Enter key.
To shift focus from box to box on the navigation bar, press the Tab key. To shift focus from the code window to the navigation bar, press the shortcut key combination Ctrl+ F2. To navigate directly to a procedure or other member of a class, choose it in the right drop-down. To navigate to a class or type, choose it in the middle drop-down. To navigate to another project that the current file belongs to, choose it in the left drop-down. You can navigate around the drop-down boxes as follows: In a partial class, members defined outside the current code file may be disabled (they appear in gray). The navigation bar appears when you edit code in a Visual Basic, C#, or C++ code base. You can choose a type or member to go directly to it. You can use the navigation bar (the drop-down boxes at the top of the code window) to navigate to code in a codebase. These commands are also available on the View menu, under Navigate Backward and Navigate Forward. These buttons retain the last 20 locations of the insertion point. You can use the Navigate Backward ( Ctrl+ -) and Navigate Forward ( Ctrl+ Shift+ -) buttons on the toolbar to move the insertion point to previous locations, or to return to a more recent location from a previous location. Navigate Backward and Navigate Forward commands This topic summarizes the different ways you can navigate your code, and provides links to topics that go into more detail. Visual Studio provides numerous ways to navigate code in the editor.