Advertisement

VS Go To Definition

Started by September 24, 2015 09:44 PM
3 comments, last by ericrrichards22 9 years, 4 months ago

For a while Go To Definition (and by extension Productivity Power Tools' ctrl+click) took from call to declaration and from declaration to definition, and back again, even if the definition and declaration didn't match completely, but the names were the same.

For instance I could toggle between the declaration and definition of Purr() by ctrl+clicking on either despite the fact that their argument lists don't match. I found this immensely useful, because in my workflow I routinely change the argument list in the source file and then want to quickly navigate to the declaration, which is now out of date. VS did this for a while, but then it stopped. Now, Go To Definition works as intended when there are no differences, but only navigates to the declaration if no exact matching definition is found.

This may be due to some extension or maybe because I removed one at some point, but I'm unable find anything that could be the culprit.


struct Cat {
   void Purr(int32 iLenInMs);
   void CoughFurballForNoReasonInstead();
   };

void Cat::Purr(uint32 iLenInMs)
{
cout << "purring is for pussies" << std::endl;
CoughFurballForNoReasonInstead();
}

I have the following extensions installed:

AStyle

Code alignment

CodeMaid

Concurrency Visualizer

Disable Mouse Wheel Zoom

Hide Main Menu

I Hate #Regions

Productivity Power Tools (everything enabled, except for Column Guides, Fix Mixed Tabs and Organize VB Imports)

WakaTime

VA X, latest version

VSColorOutput

There are a few more, but these are not related to C++ in any way. I'm using VS2013.

My main plugin is Resharper (I work in C# but there is a C++ version)

The C# has goto definition and goto implementation, the later is great as it will show all the implementations of an interface func or abstract func etc. So many good things in resharper I would not work without it now

Advertisement

I just tried this on VS2012. If I edit a signature so that they don't match, then yeah, "Go to Definition" and "Go to Declaration" stop working for me too (due to the mismatch).

FWIW, Visual Assist X's "Go to" (alt+g) does continue working despite the mismatch, but that's a costs-money plugin...

Both VS's built-in and VAX's "Find all references" feature seems to work despite the mismatch too.

I just tried this on VS2012. If I edit a signature so that they don't match, then yeah, "Go to Definition" and "Go to Declaration" stop working for me too (due to the mismatch).

FWIW, Visual Assist X's "Go to" (alt+g) does continue working despite the mismatch, but that's a costs-money plugin...

Both VS's built-in and VAX's "Find all references" feature seems to work despite the mismatch too.

Ha - found it! It's an option within VAX under general options.

Thanks for testing!

My main plugin is Resharper (I work in C# but there is a C++ version)

The C# has goto definition and goto implementation, the later is great as it will show all the implementations of an interface func or abstract func etc. So many good things in resharper I would not work without it now

Quite possibly the best $100 I have ever spent.

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

This topic is closed to new replies.

Advertisement