Search code examples
c++visual-studioide

Visual Studio 2022 - Is there a way to "link" two tabs so they always view at the same time?


Example of 3 pairs of .h/.cpp I want locked together(https://i.sstatic.net/qEzRP.png)

Basically, I like to have my .h and .cpp files open together just so I can easily reference its members. I know VS2022 has tons of functionality, so I was wondering if there was a way lock two tabs in separate windows on VS so that whenever I select either of them in there separate windows, the matching .h/.cpp will automatically be selected as well.

Briefly looked through the tab and windows options and wasn't able to dig up anything helpful.


Solution

  • As far as I know, Visual Studio itself does not provide this functionality. You can use Visual Studio's object browser instead.

    Select Class View Window -> right click class -> Browse Definition.

    Drag the window to one side and dock it separately

    Then double click on the method to jump to the definition. Such as

    enter image description here