OneAndOnly
OneAndOnly

Reputation: 1056

Visual Studio's "go to definition" goes to a wrong function/line?

So this happened after my project got to around 6-7k lines of codes, and for some reason go to definition goes to a wrong line for some of the functions. This only happens for old functions inside of a specific .c file.

So when I use an old function inside of that .c file and try to use F12, it goes to a wrong line/function, almost feels like its going to its old line number.

I'm using visual studio 2019, how can i fix this?

Upvotes: 13

Views: 5000

Answers (2)

Zachwuzhere
Zachwuzhere

Reputation: 489

Deleting the .vs folder will fix this issue but it will delete some settings.

Recreating the database fixed the issue for me: Tools -> Options -> Text Editor -> C/C++ -> Advanced -> Recreate Database == True. Then restart Visual Studios.

enter image description here

Upvotes: 26

Pedro77
Pedro77

Reputation: 5294

Try this:

  • Close VS
  • Delete the .vs folder
  • Reopen VS

Works for me

Upvotes: 3

Related Questions