Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 260
OneAndOnly Avatar asked Feb 17 '26 22:02

OneAndOnly


2 Answers

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

like image 152
Zachwuzhere Avatar answered Feb 20 '26 21:02

Zachwuzhere


Try this:

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

Works for me

like image 31
Pedro77 Avatar answered Feb 20 '26 20:02

Pedro77



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!