1

Let's say a function only has 1 reference (called only 1 time).

Is there a hotkey to jump from the body of the method, to the line where it is being called?

I know the reverse is F12, but it would be useful if something like this exists.

mm8
  • 163,881
  • 10
  • 57
  • 88
mattcall65
  • 59
  • 3
  • 2
    Are you looking for the **Find All References** command? Shift + F12 – Peter Csala Aug 09 '21 at 13:14
  • 1
    try with Alt+Shift+[ https://stackoverflow.com/a/54200926/3163418 – mapa0402 Aug 09 '21 at 13:20
  • 1
    I was kind of looking for what peter said, but if there is one and only one reference, it would be nice to directly jump to it with a hotkey. I realize something like this probably doesn't exist natively though. – mattcall65 Aug 10 '21 at 12:56
  • Echoing what mattcall65 says. When there is only one reference, can it please jump directly to it? Resharper has had this ability since forever. Miss it greatly. tbh it seems to be the source for many of the ideas for VS improvements over the years. – David Pierson Jun 06 '22 at 22:12

2 Answers2

1

Based on my test, I think Peter's advice is feasible.

First, Please click the method name, like the following:

enter image description here

Second, Please try Shift + F12 to find all the called methods.

enter image description here

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
1

Works in debugger:

If you press ctrl + d + c, you can traverse up the call stack and accomplish this.

mattcall65
  • 59
  • 3