Visual Studio: How can I see the same file in two separate tab groups?
I want to be able to edit one method while looking at another method in the same file, as reference. Can this be done?
Solution 1:
You can open the file in another tab (Window
-> New Window
).
Doing so you have two copies of the same file. Then you can right-click the tab bar and select New Vertical Tab Group
(or New Horizontal Tab Group
, the one you like more).
Hope I understood you question..
Solution 2:
Be on the tab you want to duplicate,
then click in the menu bar at the top onWindow
>New Window
Finally drag & drop the second window to the the left or right side to show both views next to each other.
Et voila, there you have it :)
EDIT
It seems that this function is not implemented in all version of VS.
In my case (V 15.4.2 (2017)
, V 15.9.7 (2017)
& V 16.2.5 (2019)
) it just works fine.
Solution 3:
Only vertically that I'm aware. When looking at the code, right above the vertical scroll bar is a small rectangle, drag it down to get a split view of the file.